MCP Tools Reference: calendarmcp.googleapis.com

工具:list_calendars

返回相应用户有权访问的日历(即用户的日历列表)。使用此工具将日历标识数据(例如“我的家庭日历”)解析为相应的 calendar_id(电子邮件标识符)

以下示例演示了如何使用 curl 调用 list_calendars MCP 工具。

Curl 请求
curl --location 'https://calendarmcp.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": "list_calendars",
    "arguments": {
      // provide these details according to the tool MCP specification
    }
  },
  "jsonrpc": "2.0",
  "id": 1
}'
                

输入架构

ListCalendarsRequest

JSON 表示法
{

  "pageSize": integer

  "pageToken": string
}
字段

联合字段 _page_size

_page_size 只能是下列其中一项:

pageSize

integer

可选。每页显示的结果数上限。默认值为 100,最大值为 250

联合字段 _page_token

_page_token 只能是下列其中一项:

pageToken

string

可选。用于指定要返回哪个结果页面的令牌。

输出架构

ListCalendarsResponse

JSON 表示法
{
  "calendars": [
    {
      object (CalendarListItem)
    }
  ],

  "nextPageToken": string
}
字段
calendars[]

object (CalendarListItem)

日历列表。

联合字段 _next_page_token

_next_page_token 只能是下列其中一项:

nextPageToken

string

下一页面令牌。如果不存在下一页,则省略。

CalendarListItem

JSON 表示法
{
  "id": string,
  "summary": string,
  "description": string,
  "timeZone": string
}
字段
id

string

标识符。日历的电子邮件地址。

summary

string

仅限输出。标题。

description

string

仅限输出。说明。

timeZone

string

仅限输出。时区。

工具注释

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

授权范围

需要以下 OAuth 范围之一:

  • https://www.googleapis.com/auth/calendar
  • https://www.googleapis.com/auth/calendar.readonly
  • https://www.googleapis.com/auth/calendar.calendarlist
  • https://www.googleapis.com/auth/calendar.calendarlist.readonly