ツール: 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 } |
| フィールド | |
|---|---|
共用体フィールド
|
|
pageSize |
省略可。ページあたりの最大結果数。デフォルトは |
共用体フィールド
|
|
pageToken |
省略可。返す結果ページを指定するトークン。 |
出力スキーマ
ListCalendarsResponse
| JSON 表現 |
|---|
{
"calendars": [
{
object ( |
| フィールド | |
|---|---|
calendars[] |
カレンダーのリスト。 |
共用体フィールド
|
|
nextPageToken |
次のページトークン。次のページが存在しない場合は省略されます。 |
CalendarListItem
| JSON 表現 |
|---|
{ "id": string, "summary": string, "description": string, "timeZone": string } |
| フィールド | |
|---|---|
id |
ID。カレンダーのメールアドレス。 |
summary |
出力専用。タイトル。 |
description |
出力専用。説明。 |
timeZone |
出力専用。タイムゾーン。 |
ツールのアノテーション
破壊的ヒント: ❌ | べき等ヒント: ✅ | 読み取り専用ヒント: ✅ | オープン ワールド ヒント: ❌
認可スコープ
次の OAuth スコープのいずれかが必要です。
https://www.googleapis.com/auth/calendarhttps://www.googleapis.com/auth/calendar.readonlyhttps://www.googleapis.com/auth/calendar.calendarlisthttps://www.googleapis.com/auth/calendar.calendarlist.readonly