Narzędzie: label_message
Dodaje co najmniej 1 etykietę do konkretnej wiadomości na koncie Gmail uwierzytelnionego użytkownika.
Aby znaleźć identyfikator wiadomości, użyj narzędzi takich jak search_threads lub get_thread. Jeśli nie masz pewności, jaki jest identyfikator etykiety użytkownika, najpierw użyj narzędzia list_labels, aby odkryć dostępne etykiety i ich identyfikatory.
Poniższy przykład pokazuje, jak za pomocą znaku curl wywołać narzędzie label_message MCP.
| Żądanie 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": "label_message", "arguments": { // provide these details according to the tool MCP specification } }, "jsonrpc": "2.0", "id": 1 }' |
Schemat wejściowy
Komunikat żądania dla RPC LabelMessage.
LabelMessageRequest
| Zapis JSON |
|---|
{ "messageId": string, "labelIds": [ string ] } |
| Pola | |
|---|---|
messageId |
Wymagane. Identyfikator wiadomości, do której chcesz dodać etykiety. |
labelIds[] |
Wymagane. Identyfikatory etykiet do dodania. |
Schemat wyjściowy
Wiadomość z odpowiedzią dla RPC LabelMessage.
Adnotacje narzędzi
Destructive Hint: ❌ | Idempotent Hint: ✅ | Read Only Hint: ❌ | Open World Hint: ❌