เครื่องมือ: 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 } |
| ช่อง | |
|---|---|
ฟิลด์ Union
|
|
pageSize |
ไม่บังคับ ผลการค้นหาสูงสุดต่อหน้า ค่าเริ่มต้น |
ฟิลด์ Union
|
|
pageToken |
ไม่บังคับ โทเค็นที่ระบุหน้าผลการค้นหาที่จะแสดง |
สคีมาเอาต์พุต
ListCalendarsResponse
| การแสดง JSON |
|---|
{
"calendars": [
{
object ( |
| ช่อง | |
|---|---|
calendars[] |
รายการปฏิทิน |
ฟิลด์ Union
|
|
nextPageToken |
โทเค็นหน้าถัดไป ละเว้นหากไม่มีหน้าถัดไป |
CalendarListItem
| การแสดง JSON |
|---|
{ "id": string, "summary": string, "description": string, "timeZone": string } |
| ช่อง | |
|---|---|
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