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
}
ช่อง

ฟิลด์ Union _page_size

_page_size ต้องเป็นค่าใดค่าหนึ่งต่อไปนี้เท่านั้น

pageSize

integer

ไม่บังคับ ผลการค้นหาสูงสุดต่อหน้า ค่าเริ่มต้น 100, สูงสุด 250

ฟิลด์ Union _page_token

_page_token ต้องเป็นค่าใดค่าหนึ่งต่อไปนี้เท่านั้น

pageToken

string

ไม่บังคับ โทเค็นที่ระบุหน้าผลการค้นหาที่จะแสดง

สคีมาเอาต์พุต

ListCalendarsResponse

การแสดง JSON
{
  "calendars": [
    {
      object (CalendarListItem)
    }
  ],

  "nextPageToken": string
}
ช่อง
calendars[]

object (CalendarListItem)

รายการปฏิทิน

ฟิลด์ Union _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