MCP Tools Reference: slidesmcp.googleapis.com

工具:read_slide_page

从 Google 幻灯片演示文稿中读取单个幻灯片/页面的 JSON 表示形式。

对应于 REST API 中的 presentations.pages.get。

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

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

输入架构

读取单个演示页面的请求。

ReadSlidePageRequest

JSON 表示法
{
  "presentationId": string,
  "pageId": string,
  "fields": [
    string
  ],

  "commentsIncluded": boolean
}
字段
presentationId

string

必需。包含相应页面的演示的 ID。

pageId

string

必需。要检索的幻灯片页面的 ID。

fields[]

string

可选。一个字段掩码,用于指定要为幻灯片页面返回的属性子集。路径必须与 Google Slides REST API 资源结构(例如 Page、PageElement、Shape、Image、Table、Line、Video、TextContent)准确匹配。

重要准则:- 始终使用目标字段掩码,而不是提取未加掩码或通用的整页对象。- 语法:支持点表示法和子选择括号(例如 pageElements(objectId,shape.text) 或 pageElements.objectId,pageElements.shape.text)。- 仅包含您需要的字段。

联合字段 _comments_included。

_comments_included 只能是下列其中一项:

commentsIncluded

boolean

可选。如果为 true,则回答中将包含注释。默认情况下,不包含注释。

输出架构

包含所请求演示幻灯片页面的 JSON 表示形式的响应。

ReadSlidePageResponse

JSON 表示法
{
  "content": {
    object
  }
}
字段
content

object (Struct format)

Google 幻灯片演示文稿幻灯片页面的 JSON 表示形式。

结构体

JSON 表示法
{
  "fields": {
    string: value,
    ...
  }
}
字段
fields

map (key: string, value: value (Value format))

无序的动态类型值映射。

包含一系列 "key": value 对的对象。示例:{ "name": "wrench", "mass": "1.3kg", "count": "3" }。

FieldsEntry

JSON 表示法
{
  "key": string,
  "value": value
}
字段
key

string

value

value (Value format)

值

JSON 表示法
{

  "nullValue": null,
  "numberValue": number,
  "stringValue": string,
  "boolValue": boolean,
  "structValue": {
    object
  },
  "listValue": array
}
字段
联合字段 kind。值的类型。kind 只能是下列其中一项:
nullValue

null

表示 JSON null。

numberValue

number

表示 JSON 数字。不得为 NaN、Infinity 或 -Infinity,因为 JSON 不支持这些值。此外,由于 JSON 格式通常不支持在其数字类型中使用较大的 Int64 值,因此该格式也无法表示这些值。

stringValue

string

表示 JSON 字符串。

boolValue

boolean

表示 JSON 布尔值(JSON 中的 true 或 false 字面量)。

structValue

object (Struct format)

表示 JSON 对象。

listValue

array (ListValue format)

表示 JSON 数组。

ListValue

JSON 表示法
{
  "values": [
    value
  ]
}
字段
values[]

value (Value format)

动态类型值的重复字段。

NullValue

表示 JSON null。

NullValue 是一个标记,使用只有一个值的枚举来表示 Value 类型联合的 null 值。

如果类型为 NullValue 的字段的值不是 0,则视为无效。大多数 ProtoJSON 序列化程序都会发出一个 Value,并将 null_value 设置为 JSON null,无论整数值是多少,因此会往返于 0 值。

枚举
NULL_VALUE Null 值。

工具注释

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

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

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

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

授权范围

需要以下 OAuth 范围之一:

  • https://www.googleapis.com/auth/drive.readonly
  • https://www.googleapis.com/auth/presentations.readonly
  • https://www.googleapis.com/auth/drive
  • https://www.googleapis.com/auth/drive.file
  • https://www.googleapis.com/auth/presentations