Tools and prompts
The MCP server's tools by scope, how they choose an account, and their mail, calendar, contact and prompt options.
Reference for what an agent on https://api.workwae.com/mcp can call. Read it when you choose a credential's scopes or write instructions for an agent. To connect a client, see MCP server.
Tools by scope
A client sees only the tools its credential's scopes allow.
| Scope | Tools |
|---|---|
read | list_accounts, get_current_time, list_changes, list_mailboxes, search_messages, get_message, list_threads, get_thread, get_attachment, list_calendars, list_events, get_event, find_availability, pick_meeting_time, search_contacts |
write | connect_account, create_draft, update_draft, delete_draft, mark_messages, move_messages, create_event, update_event, delete_event, respond_to_event, create_contact, update_contact |
send | send_message, send_draft, cancel_send, preview_message, commit_message; also create_event, update_event, delete_event and respond_to_event when they email anyone outside the account |
search_messagesis the way to find and list mail;get_threadreads a conversation with its bodies in one call.mark_messagesandmove_messagestriage up to 50 messages, or a whole thread, at once.preview_message,commit_messageandpick_meeting_timeback the MCP Apps views;commit_messageis for the review card only.- Claude Code keeps
search_messagesandlist_eventsloaded while it defers the others.
Refusals come back as tool errors whose text starts with the reason (account_not_found: ...) and says what to do next, such as which tool the missing id comes from, so the model can recover. How sends are confirmed and limited is in Sending safely.
Working with accounts
Tools that work on one account take accountId: the account's id or its email address. Every result names its account. accountId may be left out when:
- the key or grant is limited to exactly one account;
- a message id names it (the server finds the caller's account holding the message);
- a calendar or contacts tool is called and only one account syncs them.
Otherwise the refusal names the accounts to choose from.
list_accountsshows each account's provider, status (and why, when not active), calendar time zone, what it can do (mail, send, calendar, contacts) and the addresses it can send as, default first.list_changesreads the change feed across the caller's accounts.- Times show in the account's calendar zone, or in the IANA zone passed as
timeZone(invalid_time_zoneotherwise). get_current_timeuses the zone asked for, else that ofaccountId, else the one the credential's accounts' calendars share, else UTC.
Connecting another account
connect_account returns a link, valid for an hour, where the user connects another mailbox. provider is google, microsoft or imap; left out, the page offers all three. Clients that support URL elicitation open the link for the user.
- A key limited to accounts is refused with
account_scope_forbidden. - Under an OAuth grant for specific accounts, the new account is out of reach until the user signs in again and picks it.
Search and read
search_messagestakesq: words,"exact phrase",OR,-exclude. Left out, it lists newest first.- Filters:
from,to,unread,flagged,hasAttachments,after,beforeandmailbox, an id or a role (inbox,archive,sent,drafts,trash,spam,all). - Pages hold 20 messages (at most 50); a listing of one mailbox estimates its total.
detailisbriefby default (one line and a 120-character snippet per message);fulladds recipients, labels and mailboxes.- Without
accountId,search_messagessearches every account the caller reaches, up to 25, merged newest first without paging, and lists any that failed. A mailbox role works across accounts; a mailbox id or a cursor needsaccountId. get_messageremoves quoted reply history, signatures and mobile footers;quoted: truekeeps them. Bodies come in pages of 20,000 characters; pass the returned offset asbodyOffsetto read on.get_threadreturns a conversation oldest first with the latest body (bodies: "latest", the default), every body ("all") or snippets only ("none"). Bodies share 30,000 characters; a cut one continues withget_message.get_attachmentreturns at most 10 MiB.
Triage
mark_messagessets read and flagged.move_messagesmoves to a mailbox (to: "trash"trashes;"archive"on Gmail removes the Inbox label) or adds and removes Gmail labels.- Both take up to 50
messageIdsor athreadIdand report each failure.
Compose
create_draft, update_draft and send_message share their fields:
| Field | Meaning |
|---|---|
body, format | The text, as text or html. |
| Recipients | Strings: "Ada Lovelace <ada@example.com>" or a bare address. |
reply | { messageId, mode: "reply" | "replyAll" | "forward" } fills in the recipients (reply-all leaves out the account's own addresses), the Re:/Fwd: subject, threading and the quoted original. body is then only the new part. Forwarding attaches the original's files unless includeAttachments is false. |
attachments | Files as base64, or { fromMessageId, attachmentId } to attach a file the account received. The server fetches it, so its bytes never pass through the model. |
update_draftreplaces the whole draft, so pass every field it should keep; the draft gets a new id.send_messageandsend_draftsend at once or atsendAt.cancel_sendcancels a queued send during the account's undo window or before itssendAt.
Calendar and contacts
list_eventslists occurrences overlapping a range, fromstart(default now) toend(default 90 days later), 50 a page, withdetailbrieforfull.qfinds events whose subject, location, organizer or attendees contain all its words.list_events,get_eventandfind_availabilityshow times in the account's zone ortimeZone;find_availabilityreadsworkingHoursin that zone.create_eventgoes to the account's primary calendar unlesscalendarIdnames another. It takes onemeeting:{ provider: "teams" | "meet" | "zoom" | "webex" }or{ url }. Teams needs a Microsoft account and Meet a Google one (meeting_provider_mismatchotherwise).update_eventtakes onlymeeting: { url }, ornullto remove the link.- Calendar writes that email attendees or the organizer need
send; see Calendar writes are sends. search_contactsfinds contacts by name, address, phone number or organization and returns full records, 20 a page.
Prompts
Clients list prompts as slash commands. account completes from the caller's own accounts. A prompt mentions a write or send tool only when the caller has its scope.
| Prompt | What it does | Arguments |
|---|---|---|
triage_inbox | Sorts recent inbox mail into replies needed, actions, FYI and noise. | account, since |
draft_reply | Drafts a reply to a message for the user to review. Needs read and write. | messageId, intent |
schedule_meeting | Finds times everyone is free and, once the user picks one, books it. | attendees, duration, window |
weekly_agenda | The week's events by day, with conflicts, open invitations and free blocks. | account, week |
summarize_thread | Positions, decisions, open questions and next steps of a conversation. | threadId |