Công cụ: get_user_profile
Nhận thông tin hồ sơ về bản thân (tên và email).
Mẫu sau đây minh hoạ cách sử dụng curl để gọi công cụ MCP get_user_profile.
| Yêu cầu 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 }' |
Giản đồ đầu vào
Thông báo yêu cầu cho GetUserProfile.
Giản đồ đầu ra
Thông báo phản hồi cho GetUserProfile.
GetUserProfileResponse
| Biểu diễn dưới dạng JSON |
|---|
{ "name": string, "emailAddress": string } |
| Trường | |
|---|---|
name |
Tên hiển thị của người dùng. |
emailAddress |
Địa chỉ email tài khoản của người dùng. |
Chú giải công cụ
Gợi ý phá huỷ: ❌ | Gợi ý bất biến: ✅ | Gợi ý chỉ đọc: ✅ | Gợi ý thế giới mở: ❌
Phạm vi cấp phép
Yêu cầu một trong các phạm vi OAuth sau:
https://www.googleapis.com/auth/userinfo.profile