Skip to main content
Glama

replace_email_document

Destructive

Validate, compile and stage a complete EmailDocument in the selected resource draft using synthetic preview data. Failed compilation saves nothing. Returns the compiled preview. Does not change live content or send email.

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>",
      "document": "<document>"
    },
    "name": "replace_email_document"
  }
}

Input Schema

NameRequiredDescriptionDefault
targetYesTarget email resource; kind must be email.
documentYes

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",
      -  "document"
      -]New value: +[
      +  "target",
      +  "document"
      +]
  3. First observed

TDQS

A3.7/5.0
Behavior4/5

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

With destructiveHint=true and readOnlyHint=false already declared, the description adds real context beyond annotations: failed compilation is atomic ('saves nothing'), a preview is returned, and live content/email sending are untouched. It does not clarify whether existing draft content is overwritten, which is the one behavior an agent most needs given the destructive hint.

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

Conciseness5/5

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

Four short sentences, each carrying distinct information: action, failure atomicity, return value, and negative side effects. The purpose and the safety boundaries are front-loaded with no filler.

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

Completeness3/5

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

For a nested, 2-required-parameter mutation tool with no output schema, the description covers return behavior ('Returns the compiled preview') and side-effect boundaries, but leaves the meaning of a 'complete' EmailDocument and the draft prerequisite unexplained, and does not say whether prior draft content survives.

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

Parameters3/5

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

Schema coverage is 50% (only draftId is annotated), so the description must compensate. It does add that the document must be a 'complete' EmailDocument and that it lands in the selected draft, but it says nothing about the target's kind/ID selection or the document's internal shape.

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

Purpose4/5

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

The description names specific verbs and a resource: 'Validate, compile and stage a complete EmailDocument in the selected resource draft.' That distinguishes it clearly from edit_email_document (partial edits) and get_email_document (retrieval), though no sibling is named explicitly.

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?

'using synthetic preview data' and 'Does not ... send email' imply the tool is for whole-document replacement plus preview, but the description never states when to choose it over edit_email_document or replace_page_document, nor any prerequisite such as an existing draft.

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.