Skip to main content
Glama

Create watch

create_watch

Create event-based mailbox watches to get notified of thread replies, new senders, query matches, or missing replies instead of polling search.

Instructions

Watch a mailbox for new mail and get events instead of polling search. kind: thread_reply (a new message in thread_id from someone other than the mailbox owner), from (new mail from an address or a domain), query (new mail matching a where filter, same schema as search_messages, checked against newly indexed messages only), no_reply_by (no message from others in thread_id, or after message_id, before deadline: fires once at the deadline; a reply ends the watch quietly, end_reason replied; the mailbox owner's own follow-ups do not count). A just-sent message is found once it is indexed. Needs the search index on the mailbox. Events carry ids only (no subject, sender or body): read them with list_watch_events, then fetch the message with get_message. Optional sink names an operator webhook from list_watches for push delivery. Expires after 30 days by default (max 180); at most 50 active watches per connection.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "account": "<account>",
      "kind": "<kind>"
    },
    "name": "create_watch"
  }
}

Input Schema

NameRequiredDescriptionDefault
fromNofrom: an address (ann@example.com) or a domain (example.com).
kindYesWhat to watch for; each kind uses the fields named below.
sinkNoName of an operator webhook sink (list_watches).
whereNoquery: a search_messages `where` condition.
accountYesMailbox alias or email address from list_accounts.
deadlineNono_reply_by: RFC 3339 instant.
thread_idNothread_reply, no_reply_by: thread id from search_messages or get_message.
expires_atNoDefault 30 days from now, at most 180.
message_idNono_reply_by, instead of thread_id: the message that should get an answer.

Output Schema

NameRequiredDescriptionDefault
fromNo
kindNo
sinkNo
firedNo
stateNo
whereNo
accountNo
deadlineNo
watch_idNo
thread_idNo
created_atNo
end_reasonNo
expires_atNo
message_idNo
last_fired_atNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • addedInput schema / properties / kind / description
      Added value: +"What to watch for; each kind uses the fields named below."
  2. First observedv0.11.0

TDQS

A4.6/5.0
Behavior5/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Goes well beyond the annotations, which only say it is non-read-only, non-idempotent and non-destructive. The description discloses prerequisites (search index must be on the mailbox), eventual-consistency caveat (a just-sent message is found once indexed), expiry defaults and caps (30 days, max 180, 50 watches per connection), and the quiet-termination semantics of no_reply_by including the `replied` end_reason and that owner follow-ups do not count.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Front-loaded with the core verb and the polling contrast, and every subsequent sentence carries operational information. It is one dense block rather than a structured list, which makes the per-kind rules harder to scan, but there is no filler.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a 9-parameter tool with nested objects, an output schema, and just four annotations, the description supplies everything an agent needs: prerequisites, lifetime limits, quota, event payload shape, and the required follow-up read path. Return-value details are correctly deferred to the output schema.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100%, so the baseline is 3, but the description adds genuine meaning: it maps each `kind` to the fields that kind uses, explains that `query`/`where` is checked against newly indexed messages only, that `from` accepts an address or domain, and that `message_id` is an alternative to `thread_id` for no_reply_by. Some per-field detail (e.g., expires_at interactions) is left to the schema.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

States a specific verb and resource ('Watch a mailbox for new mail') and explicitly contrasts itself with the sibling polling path ('get events instead of polling search'). It then enumerates the four watch kinds with their exact trigger conditions, so an agent can distinguish this from list_watches or delete_watch without opening a schema.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Gives clear context for use and the follow-up workflow: events carry ids only, so read them with list_watch_events then fetch with get_message, and `sink` names a webhook from list_watches. It lacks explicit when-not-to-use guidance (e.g., when delete_watch or a plain search would be preferred), so it stops short of full alternative routing.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.