Narzędzie: label_thread
Dodaje etykiety do całego wątku na koncie Gmail uwierzytelnionego użytkownika. Ta operacja wpłynie na wszystkie wiadomości znajdujące się obecnie w wątku oraz na wszystkie wiadomości, które zostaną do niego dodane w przyszłości.
Jeśli nie masz pewności, jaki jest identyfikator wątku, najpierw użyj narzędzia search_threads.
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_thread 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_thread", "arguments": { // provide these details according to the tool MCP specification } }, "jsonrpc": "2.0", "id": 1 }' |
Schemat wejściowy
Wiadomość z prośbą o wywołanie RPC LabelThread.
LabelThreadRequest
| Zapis JSON |
|---|
{ "threadId": string, "labelIds": [ string ] } |
| Pola | |
|---|---|
threadId |
Wymagane. Unikalny identyfikator wątku, do którego chcesz dodać etykiety. |
labelIds[] |
Wymagane. Unikalne identyfikatory etykiet do dodania. Może to być identyfikator etykiety systemowej (np. „SKRZYNKA ODBIORCZA”, „KOSZ”, „SPAM”, „OZNACZONE”, „NIEPRZECZYTANE”) lub identyfikator etykiety zdefiniowanej przez użytkownika. |
Schemat wyjściowy
Wiadomość z odpowiedzią dla RPC LabelThread.
Adnotacje narzędzi
Destructive Hint: ❌ | Idempotent Hint: ✅ | Read Only Hint: ❌ | Open World Hint: ❌