MCP Tools Reference: classroommcp.googleapis.com

工具:search_course_standards

在课程中搜索学业标准,以便为课程作业或评分准则添加标签。需要教师为课程配置学业标准。

  • 特定标准:使用确切代码(例如“HS-LS1-1”)或特定关键字(includeGroupingStandards=false)进行搜索。
  • 类别:将 includeGroupingStandards 设置为 true,并使用宽泛的主题词来查找父级类别,然后将类别 ID 传递到 learningStandardIds 中以缩小结果范围。

以下代码示例展示了如何使用 curl 调用 search_course_standards MCP 工具。

Curl 请求
curl --location 'https://classroommcp.googleapis.com/mcp/v1' \
--header 'Authorization: Bearer YOUR_ACCESS_TOKEN' \
--header 'content-type: application/json' \
--header 'accept: application/json, text/event-stream' \
--data '{
  "method": "tools/call",
  "params": {
    "name": "search_course_standards",
    "arguments": {
      // Provide these details according to the MCP tool specification.
    }
  },
  "jsonrpc": "2.0",
  "id": 1
}'

输入架构

请求在预先选择的课程级学业标准树中进行搜索。

SearchCourseStandardsRequest

JSON 表示法
{
  "courseId": string,
  "learningStandardIds": [
    string
  ],
  "query": string,
  "includeGroupingStandards": boolean
}
字段
courseId

string

必需。课程的标识符。

learningStandardIds[]

string

可选。将搜索范围限制为这些标准集或类别标准及其后代。请传递 Course.learning_goals(在 list_courses 中)的标准集 ID 或之前调用(includeGroupingStandards = true,而非 standardCode)中的类别 ID,但不能同时传递两者。如果留空,则搜索课程中的所有标准。

query

string

必需。搜索字词不区分大小写;结果的代码或语句中必须包含以空格分隔的所有字词。- 当 includeGroupingStandards = false 时:传递确切的标准代码(例如“HS-LS1-1”)或 2-3 个特定关键字(例如“area triangles”)。- 当 includeGroupingStandards = true 时:传递 1-2 个与类别标题匹配的宽泛领域词汇(例如“几何”)。

includeGroupingStandards

boolean

可选。如果为 true,则返回类别标题(无法标记到课程作业),其 ID 可缩小后续搜索范围。如果为 false(默认),则返回可在课程作业中添加标签的标准。

输出架构

包含学业标准的响应。

SearchCourseStandardsResponse

JSON 表示法
{
  "learningStandards": [
    {
      object (LearningGoal)
    }
  ]
}
字段
learningStandards[]

object (LearningGoal)

匹配标准的列表。

LearningGoal

JSON 表示法
{
  "id": string,
  "type": enum (Type),
  "standardCode": string,
  "title": string,
  "documentTitle": string
}
字段
id

string

仅限输出。学习目标的 ID。如需附加标准,请使用 search_course_standards 中的 id(而非 standardCode)。

type

enum (Type)

仅限输出。学习目标的类型。

standardCode

string

仅限输出。标准代码(例如“NY-2.NBT.4”)。仅针对标准进行填充。

title

string

仅限输出。标准的陈述说明,或技能的人类可读标题。

documentTitle

string

仅限输出。课程文档名称。仅针对标准进行填充。

类型

学习目标的类型。

枚举
TYPE_UNSPECIFIED 未指定学习目标类型。
STANDARD 学术课程中的学业标准。
SKILL 代表教育概念或能力的技能。在 Google 课堂中,只有教师可以添加或移除技能。

工具注释

工具注解会发送到 MCP 客户端,用于描述给定工具的基本风险。大多数客户端会将这些提示视为不可信,但它们可用于决定何时向用户发送确认提示。

除了标题字符串之外,还定义了以下布尔值提示:

  • readOnlyHint:如果为 true,则该工具不会修改其环境。默认值:false。
  • destructiveHint:如果为 true,则该工具可以执行破坏性操作。如果为 false,则该工具只能执行添加操作。默认值:true。
  • idempotentHint:如果为 true,则使用相同参数重复调用该工具不会对其环境产生额外影响。默认值:false。
  • openWorldHint:如果为 true,则该工具可以与外部实体的“开放世界”进行交互。如果为 false,则该工具只能与内部实体交互。例如,网页搜索工具是开放式的,而记忆工具不是开放式的。

破坏性提示:❌ | 等幂性提示:✅ | 只读提示:✅ | 开放世界提示:❌

授权范围

需要以下 OAuth 范围之一:

  • https://www.googleapis.com/auth/classroom.courses
  • https://www.googleapis.com/auth/classroom.courses.readonly