Skip to main content
Glama

what_changed

Read-only

Reports mailbox events since a stored historyId: messages arrived or removed, labels applied or removed, plus the next id to keep. Returns event ids only, not message content.

Instructions

What happened in the mailbox since a point you already hold: messages that arrived or were removed, and labels applied or taken off — from Gmail's own event log, in one call. Pass the historyId a previous what_changed or get_profile returned; the reply carries the next one to keep. mailwarden stores NOTHING between calls, so the id lives with you. Reports EVENTS, not current state: a message that was marked unread and then read appears under both, and both are true. For how the mailbox looks NOW, use search or get_thread. Gmail keeps roughly a week of history. An id older than that is an ERROR, never an empty result — it means the question can no longer be answered incrementally, so take a fresh historyId from get_profile and re-establish state with search. labelId narrows the feed to events touching one label (e.g. 'INBOX', or a snooze label). Counts are complete even when the id lists are cut at 200 (truncated). USE WHEN: a recurring check — 'what came in since I last looked', watching a label, or confirming a bulk action landed. Far cheaper than re-running a search over the whole slice. DO NOT USE: for a first look at a mailbox (there is no id yet — start with triage_digest or search), or to read content: this returns ids only, no sender, subject or body. SIDE EFFECTS: none.

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": {
      "sinceHistoryId": "<sinceHistoryId>"
    },
    "name": "what_changed"
  }
}

Input Schema

NameRequiredDescriptionDefault
maxNo
labelIdNo
sinceHistoryIdYes

Output Schema

NameRequiredDescriptionDefault
addedYes
deletedYes
recordsYes
historyIdYes
truncatedYes
labelsAddedYes
labelsRemovedYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changedv0.32.0
    • changedInput schema / $schema
      Previous value: -"http://json-schema.org/draft-07/schema#"New value: +"https://json-schema.org/draft/2020-12/schema"
    • changedOutput schema / $schema
      Previous value: -"http://json-schema.org/draft-07/schema#"New value: +"https://json-schema.org/draft/2020-12/schema"
  2. Changed1 schema field changedv0.25.0
    • removedInput schema / additionalProperties
      Removed value: -false
  3. Addedv0.18.0

TDQS

A4.8/5.0
Behavior5/5

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

Goes well beyond readOnlyHint=true and openWorldHint=false: no server-side state between calls, ~one week of retained history, an expired id is an ERROR rather than an empty result, ids-only payload with no sender/subject/body, and complete counts even when id lists are truncated at 200. It also clarifies the crucial event-vs-state semantics with a concrete example (unread then read appears under both).

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 behavior, then parameters, then USE WHEN / DO NOT USE / SIDE EFFECTS in a scannable layout. It is dense and long, but nearly every sentence carries operational information; the truncation sentence is the one place phrasing could be tightened.

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?

An output schema exists, so return values need not be explained, yet the description still flags `truncated`, ids-only content, and complete counts. Combined with the history expiry and error semantics, nothing an agent needs to call this correctly is missing.

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?

With 0% schema coverage the description must carry the parameters, and it does for two of three: sinceHistoryId (where it comes from, what it returns) and labelId (narrowing scope with concrete examples 'INBOX', snooze label). The `max` parameter (default 500, cap 2000) is never explained, and the '200' truncation note is left ambiguous relative to that default, so a small gap remains.

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: reports mailbox events (arrivals, removals, label changes) since a held point, sourced from Gmail's own event log. It explicitly distinguishes itself from state-reading siblings (search, get_thread) and from the first-look path (triage_digest), so an agent can place it 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 Guidelines5/5

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

Contains explicit USE WHEN (recurring checks, watching a label, confirming a bulk action) and DO NOT USE (no id yet — start with triage_digest or search; not for reading content) sections, naming the alternatives directly. Includes a recovery path when the id is too old.

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