Skip to main content
Glama
mail-mcp-server

mail-mcp-server

plan_modify

Preview which emails a Gmail query will affect, return a plan ID for execute_plan, and show a summary for approval before applying archive, trash, read, star, spam, or label changes.

Instructions

Dry run: changes nothing. Returns what would be affected and a plan_id for execute_plan. Show the user the summary before asking whether to execute. Archive, trash or untrash, mark read or unread, star or unstar, mark important or not, report spam or not spam, or add/remove a label on the messages a query matches (untrash needs in:trash in the query, not_spam needs in:spam). The count is exact; top senders and sample subjects come from the newest 200. Trash holds at most 5000 per plan.

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": {
      "mailbox": "<mailbox>",
      "query": "<query>",
      "action": "<action>"
    },
    "name": "plan_modify"
  }
}

Input Schema

NameRequiredDescriptionDefault
maxNoMessages to include, default 1000, at most 200000
labelNoLabel name, for add_label and remove_label
queryYesGmail search syntax, e.g. "category:promotions older_than:30d"
actionYes
mailboxYesA connected mailbox address (see list_mailboxes)

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.2.0

TDQS

A4.5/5.0
Behavior4/5

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

With no annotations supplied, the description carries the full burden and does so well: it declares the operation is side-effect free, discloses sampling behavior (top senders and sample subjects drawn from the newest 200), guarantees count exactness, and warns of a 5000-message trash cap per plan. It stops short of stating permission/scope requirements or what happens when max exceeds the 2000-message sampling window for the summary fields.

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 single most important fact ('Dry run: changes nothing') followed by the follow-up tool and the user-confirmation instruction, so the critical information lands first. The long action enumeration partially restates the action enum already in the schema, which costs some density without adding meaning.

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

Completeness4/5

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

For a five-parameter mutation-planning tool with no annotations and no output schema, the description covers the essentials: side-effect profile, return contents (affected count, top senders, sample subjects, plan_id), sampling limits, and action-specific query requirements. A brief note on plan lifetime or how execute_plan consumes the plan_id would close the remaining gap.

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 already 80%, but the description adds real meaning beyond it: it constrains the query parameter by action (in:trash for untrash, in:spam for not_spam) and relates the sampling behavior to the max parameter. The label parameter's action pairing (add_label/remove_label) 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+resource (a dry-run plan over messages matching a query) and immediately distinguishes itself from execute_plan by returning a plan_id rather than acting. The enumerated action list makes the scope unambiguous, so an agent can tell it apart from plan_create_filter, plan_send, and other siblings 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?

Gives explicit workflow guidance ('Show the user the summary before asking whether to execute') and names the follow-up tool execute_plan, so the when-to-use and what-next are both stated. It also gives per-action preconditions (untrash needs in:trash, not_spam needs in:spam), which are the traps an agent would otherwise fall into.

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