MCP Tools Reference: calendarmcp.googleapis.com

เครื่องมือ: suggest_time

แนะนำช่วงเวลาในปฏิทินอย่างน้อย 1 รายการ

ตัวอย่างต่อไปนี้แสดงวิธีใช้ curl เพื่อเรียกใช้เครื่องมือ suggest_time 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": "suggest_time",
    "arguments": {
      // provide these details according to the tool MCP specification
    }
  },
  "jsonrpc": "2.0",
  "id": 1
}'
                

สคีมาอินพุต

ข้อความคำขอสำหรับ SuggestTime

SuggestTimeRequest

การแสดง JSON
{
  "attendeeEmails": [
    string
  ],
  "startTime": string,
  "endTime": string,

  "timeZone": string

  "durationMinutes": integer

  "preferences": {
    object (Preferences)
  }
}
ช่อง
attendeeEmails[]

string

ต้องระบุ อีเมลของผู้เข้าร่วมเพื่อค้นหาเวลาว่าง

startTime

string

ต้องระบุ จุดเริ่มต้นของช่วงเวลาการค้นหา (ISO 8601)

endTime

string

ต้องระบุ จุดสิ้นสุดของช่วงเวลาการค้นหา (ISO 8601)

ฟิลด์ Union _time_zone

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

timeZone

string

ไม่บังคับ เขตเวลาสำหรับเวลาค้นหา (รหัส IANA เช่น Europe/Zurich) ค่าเริ่มต้น: ออฟเซ็ตของ start_time หากไม่มี ระบบจะใช้เขตเวลาหลักของผู้ใช้

ฟิลด์ Union _duration_minutes

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

durationMinutes

integer

ไม่บังคับ ระยะเวลาขั้นต่ำของช่วงเวลาว่างเป็นนาที ค่าเริ่มต้น: 30

ฟิลด์ Union _preferences

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

preferences

object (Preferences)

ค่ากำหนดเพื่อค้นหาเวลาที่แนะนำ

ค่ากำหนด

การแสดง JSON
{

  "startHour": string

  "endHour": string

  "excludeWeekends": boolean

  "pageSize": integer
}
ช่อง

ฟิลด์ Union _start_hour

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

startHour

string

ชั่วโมงเริ่มต้นที่ต้องการเป็น "HH:mm" (รูปแบบ 24 ชั่วโมง)

ฟิลด์ Union _end_hour

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

endHour

string

ชั่วโมงสิ้นสุดที่ต้องการเป็น "HH:mm" (รูปแบบ 24 ชั่วโมง)

ฟิลด์ Union _exclude_weekends

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

excludeWeekends

boolean

ไม่รวมวันสุดสัปดาห์

ฟิลด์ Union _page_size

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

pageSize

integer

จำนวนช่องสูงสุดที่จะแสดงผล ค่าเริ่มต้น: 5

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

ข้อความตอบกลับสำหรับ SuggestTime

SuggestTimeResponse

การแสดง JSON
{
  "timeSlots": [
    {
      object (TimeSlot)
    }
  ]
}
ช่อง
timeSlots[]

object (TimeSlot)

ช่วงเวลาที่แนะนำ

TimeSlot

การแสดง JSON
{
  "startTime": string,
  "endTime": string,
  "durationMinutes": integer,
  "start": {
    object (DateOrDateTime)
  },
  "end": {
    object (DateOrDateTime)
  }
}
ช่อง
startTime
(deprecated)

string

เลิกใช้งานแล้ว โปรดใช้ start แทน

endTime
(deprecated)

string

เลิกใช้งานแล้ว โปรดใช้ end แทน

durationMinutes
(deprecated)

integer

เลิกใช้งานแล้ว: ใช้ start และ end เพื่อคำนวณระยะเวลาแทน

start

object (DateOrDateTime)

เวลาเริ่มต้นของช่วงเวลา

end

object (DateOrDateTime)

เวลาสิ้นสุดของช่วงเวลา

DateOrDateTime

การแสดง JSON
{
  "date": string,
  "dateTime": string,
  "timeZone": string
}
ช่อง
date

string

วันที่ ISO 8601 ตอนเที่ยงคืน UTC (เช่น '2019-11-20T00:00:00Z')

dateTime

string

การประทับเวลา ISO 8601 (เช่น '2019-11-20T08:19:06-07:00')

timeZone

string

ชื่อเขตเวลา TZDB

คำอธิบายประกอบเครื่องมือ

คำแนะนำที่ทำลายล้าง: ❌ | คำแนะนำที่ทำซ้ำได้: ✅ | คำแนะนำแบบอ่านอย่างเดียว: ✅ | คำแนะนำแบบโลกเปิด: ❌

ขอบเขตการให้สิทธิ์

ต้องใช้ขอบเขต OAuth อย่างใดอย่างหนึ่งต่อไปนี้

  • https://www.googleapis.com/auth/calendar
  • https://www.googleapis.com/auth/calendar.readonly
  • https://www.googleapis.com/auth/calendar.events
  • https://www.googleapis.com/auth/calendar.events.freebusy
  • https://www.googleapis.com/auth/calendar.freebusy