Skip to main content
Glama

Delete draft

delete_draft
Destructive

Removes project-created, unchanged drafts from Gmail Trash or IMAP Drafts; optional expected_revision guards deletion, while human-edited drafts are preserved.

Instructions

Delete a draft this project created and nobody changed since (optionally conditional on expected_revision). Gmail moves it to Trash; IMAP removes it from Drafts. Drafts written or changed by a person are never deleted (draft_conflict), and a stale expected_revision fails the same way; leave such drafts to the owner. Unknown draft ids return not_found.

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>",
      "draft_id": "<draft_id>"
    },
    "name": "delete_draft"
  }
}

Input Schema

NameRequiredDescriptionDefault
accountYesMailbox alias or email address from list_accounts.
draft_idYesDraft id from create_draft or list_drafts.
expected_revisionNoDelete only if the draft is still at this revision.

Output Schema

NameRequiredDescriptionDefault
deletedNo
draft_idNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changed
    • addedInput schema / properties / draft_id / description
      Added value: +"Draft id from create_draft or list_drafts."
    • addedInput schema / properties / expected_revision / description
      Added value: +"Delete only if the draft is still at this revision."
  2. First observedv0.11.0

TDQS

A4.7/5.0
Behavior5/5

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

Goes well beyond the annotations by disclosing per-channel semantics (Gmail moves the message to Trash, IMAP removes it from Drafts), the failure modes (draft_conflict, not_found), and that automation-owned drafts are the only ones touched. These details are consistent with destructiveHint=true and idempotentHint=false, since a repeat or stale call fails rather than silently succeeding.

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 dense sentences with the primary scope constraint front-loaded, then the conditional-parameter behavior, then the refusal rule, then the error case. No filler and nothing circular.

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 no explanation, and the description covers what an agent needs for a destructive conditional tool: eligible drafts, channel-specific removal behavior, conflict handling, and not_found. Nothing material 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?

Schema coverage is 100%, so the baseline is 3, but the description adds real meaning for expected_revision by explaining that a stale value fails identically to draft_conflict and that the delete is conditional on it. draft_id semantics are only lightly reinforced via the 'unknown draft ids return not_found' note.

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 (delete) and resource (draft) plus a precise scope: only drafts this project created and nobody has changed since. That scope implicitly but clearly separates it from update_draft or a manual cleanup flow, so an agent can identify the right tool 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?

Explicitly states the when-not case: drafts written or changed by a person are never deleted, and the agent should leave those to the owner, including when stale expected_revision produces the same failure. Alternatives such as update_draft or send_draft are not named, so it falls short of a full when/when-not/alternatives treatment.

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