Skip to main content
Glama

edit_email_document

Destructive

Stage an atomic ordered batch of set/delete edits relative to the working EmailDocument. Set replaces a whole value; parent objects must exist. Replace arrays whole. Include child-reference changes in the same batch. Compilation must succeed before the draft changes.

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": {
      "target": "<target>",
      "edits": "<edits>"
    },
    "name": "edit_email_document"
  }
}

Input Schema

NameRequiredDescriptionDefault
editsYes
targetYesTarget email resource; kind must be email.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changed
    • addedInput schema / properties / target / properties / designId
      Added value: +{
      +  "minLength": 1,
      +  "type": "string"
      +}
    • changedInput schema / properties / target / properties / kind / enum
      Previous value: -[
      -  "page",
      -  "email"
      -]New value: +[
      +  "page",
      +  "email",
      +  "wallet",
      +  "apple-wallet",
      +  "google-wallet"
      +]
  2. Changed3 schema fields changed
    • removedInput schema / properties / expectedRevision
      Removed value: -{
      -  "type": "integer"
      -}
    • removedInput schema / properties / target / properties / organizationId
      Removed value: -{
      -  "minLength": 1,
      -  "type": "string"
      -}
    • changedInput schema / required
      Previous value: -[
      -  "target",
      -  "expectedRevision",
      -  "edits"
      -]New value: +[
      +  "target",
      +  "edits"
      +]
  3. First observed

TDQS

A4.1/5.0
Behavior4/5

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

Annotations already declare destructiveHint=true and non-idempotent, but the description adds genuinely new behavioral facts: edits are staged atomically in order, and "Compilation must succeed before the draft changes" tells the agent that a failed compile means nothing is applied. It stops short of describing error reporting or what a successful stage returns.

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?

Five short sentences, front-loaded with the core action, with each sentence carrying a distinct constraint. Minor cost: terse jargon like "Compilation" and "working EmailDocument" assumes terminology the caller may not share.

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 destructive, nested-schema mutation with no output schema, the description covers the essentials an agent needs: atomicity, ordering, whole-value replacement, parent-existence requirement, and compile-gated application. It does not address permissions or how to recover from a failed batch, which are the only notable gaps.

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 50% schema coverage, the description meaningfully supplements the schema: it clarifies that set replaces a whole value, that parent objects must pre-exist, and that arrays are replaced whole rather than merged. The remaining ambiguity (which target identifier fields are valid for kind=email) is left to the schema's own nested descriptions.

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?

"Stage an atomic ordered batch of set/delete edits relative to the working EmailDocument" gives a specific verb (stage edits), a specific operation shape (ordered set/delete batch), and a specific resource (EmailDocument), which separates it from edit_page_document and edit_wallet_document by target type and from replace_email_document by being an incremental patch rather than a full replacement.

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

Usage Guidelines3/5

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

The description implies the editing workflow ("working EmailDocument", "before the draft changes") and tells the caller to bundle child-reference changes into one batch, but it never explicitly states when to prefer this over replace_email_document or that a document should be fetched first. The usage context is inferable rather than stated.

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.