MCP Tools Reference: people.googleapis.com

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

ดูข้อมูลโปรไฟล์เกี่ยวกับตัวคุณ (ชื่อและอีเมล)

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

คำขอ Curl
curl --location 'https://people.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": "get_user_profile",
    "arguments": {
      // provide these details according to the tool MCP specification
    }
  },
  "jsonrpc": "2.0",
  "id": 1
}'
                

สคีมาอินพุต

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

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

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

GetUserProfileResponse

การแสดง JSON
{
  "name": string,
  "emailAddress": string
}
ช่อง
name

string

ชื่อที่แสดงของผู้ใช้

emailAddress

string

อีเมลของบัญชีผู้ใช้

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

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

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

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

  • https://www.googleapis.com/auth/userinfo.profile