MCP Tools Reference: gmailmcp.googleapis.com

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

ดึงข้อมูลชุดข้อความอีเมลที่เฉพาะเจาะจงจากบัญชี Gmail ของผู้ใช้ที่ได้รับการตรวจสอบสิทธิ์ รวมถึงรายการข้อความในชุดข้อความนั้น

ตัวอย่างต่อไปนี้แสดงวิธีใช้ curl เพื่อเรียกใช้เครื่องมือ get_thread MCP

คำขอ Curl
curl --location 'https://gmailmcp.googleapis.com/mcp' \
--header 'content-type: application/json' \
--header 'accept: application/json, text/event-stream' \
--data '{
  "method": "tools/call",
  "params": {
    "name": "get_thread",
    "arguments": {
      // provide these details according to the tool MCP specification
    }
  },
  "jsonrpc": "2.0",
  "id": 1
}'
                

สคีมาอินพุต

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

GetThreadRequest

การแสดง JSON
{
  "threadId": string,
  "messageFormat": enum (MessageFormat)
}
ช่อง
threadId

string

ต้องระบุ ตัวระบุที่ไม่ซ้ำกันของเธรดที่จะดึงข้อมูล

messageFormat

enum (MessageFormat)

ไม่บังคับ ระบุรูปแบบของข้อความที่แสดงผลภายในชุดข้อความ ค่าเริ่มต้นคือ FULL_CONTENT

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

ชุดข้อความที่มีรายการข้อความ

ชุดข้อความ

การแสดง JSON
{
  "id": string,
  "messages": [
    {
      object (Message)
    }
  ]
}
ช่อง
id

string

ตัวระบุที่ไม่ซ้ำกันของเธรด

messages[]

object (Message)

รายการข้อความในชุดข้อความที่จัดเรียงตามลำดับเวลา

ข้อความ

การแสดง JSON
{
  "id": string,
  "snippet": string,
  "subject": string,
  "sender": string,
  "toRecipients": [
    string
  ],
  "ccRecipients": [
    string
  ],
  "date": string,
  "plaintextBody": string
}
ช่อง
id

string

ตัวระบุที่ไม่ซ้ำกันของข้อความ

snippet

string

ข้อมูลโค้ดของเนื้อความ

subject

string

เรื่องของข้อความที่ดึงมาจากส่วนหัว

sender

string

อีเมลของผู้ส่ง

toRecipients[]

string

ไปยังอีเมลของผู้รับ

ccRecipients[]

string

อีเมลของผู้รับในสำเนา

date

string

วันที่ของข้อความในรูปแบบ ISO 8601 (YYYY-MM-DD)

plaintextBody

string

เนื้อหาข้อความแบบเต็ม จะแสดงก็ต่อเมื่อ MessageFormat เป็น FULL_CONTENT เท่านั้น

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

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