工具:list_calendars
返回用户日历列表中的日历。
此工具可用于以下查询:
- 我的所有日历是什么?
示例:
list_calendars()
# Returns all calendars the authenticated user has access to.
以下示例演示了如何使用 curl 调用 list_calendars MCP 工具。
| Curl 请求 |
|---|
curl --location 'https://calendarmcp.googleapis.com/mcp' \ --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 } |
| 字段 | |
|---|---|
联合字段
|
|
pageSize |
可选。一个结果页面上返回的条目数上限。默认值为 100 个条目。每页条目数不能超过 250 个。 |
联合字段
|
|
pageToken |
可选。用于指定要返回哪个结果页面的令牌。 |
输出架构
ListCalendarsResponse
| JSON 表示法 |
|---|
{
"calendars": [
{
object ( |
| 字段 | |
|---|---|
calendars[] |
日历列表中的日历列表。 |
联合字段
|
|
nextPageToken |
用于访问此结果的下一页的令牌。如果没有更多结果,则省略此字段。 |
日历
| JSON 表示法 |
|---|
{ "id": string, "summary": string, "description": string, "timeZone": string } |
| 字段 | |
|---|---|
id |
标识符。日历的标识符。 |
summary |
日历的标题。只读。 |
description |
日历的说明。可选。只读。 |
timeZone |
日历的时区。可选。只读。 |
工具注释
破坏性提示:❌ | 等幂性提示:✅ | 只读提示:✅ | 开放世界提示:❌