Skip to main content
Glama

discard_draft

Destructive

Throw away the unpublished draft changes of one item (documentId) in one locale (omitted: the item's own language), so the working version falls back to the published one.

Instructions

Throw away the unpublished draft changes of one item (documentId) in one locale (omitted: the item's own language), so the working version falls back to the published one. The live site is unchanged; the discarded draft cannot be recovered. Refused for content that was never published (there is nothing to fall back to) — use trash_content to remove that instead. To roll back to an older version rather than the live one, use restore_version. Returns {ok:true}. Requires the content.update permission (Admin, Editor, Author — an Author only within their own sections).

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": {
      "documentId": "<documentId>"
    },
    "name": "discard_draft"
  }
}

Input Schema

NameRequiredDescriptionDefault
siteNoSite slug or id to act in (multisite). Omit to use this server's default site. Call list_sites to see what exists — an empty tree or search usually means the wrong site, not missing content.
localeNoLocale code. Omit for the document's own locale (its site-default variant, else its only variant).
documentIdYesThe item's documentId (stable across locales and versions), e.g. from list_tree, list_content or get_content.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changedv0.1.4
    • changedInput schema / properties / documentId / description
      Previous value: -"The item's documentId (stable across locales and versions), e.g. from tree, list_pages or get_content."New value: +"The item's documentId (stable across locales and versions), e.g. from list_tree, list_content or get_content."
  2. Changed1 schema field changedv0.1.3
    • changedInput schema / properties / documentId / description
      Previous value: -"Content documentId"New value: +"The item's documentId (stable across locales and versions), e.g. from tree, list_pages or get_content."
  3. First observedv0.1.0

TDQS

A4.7/5.0
Behavior5/5

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

Annotations already flag destructiveness, but the description adds critical context beyond them: the live site is unchanged, the discarded draft cannot be recovered, the operation is refused for never-published content, the exact permission required (content.update) with role nuances, and the return shape ({ok:true}). This is rich behavioral disclosure that goes well beyond the structured hints.

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?

The description is a single dense paragraph that front-loads the core action, then layers consequences, refusal conditions with alternatives, return value, and permissions. Every sentence carries essential information with no wasted words.

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?

For a destructive mutation tool with no output schema and full parameter coverage in the schema, the description covers all an agent needs: what it does, side effects, irreversibility, refusal condition, alternatives, required permissions, and return value. Nothing material is missing.

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 description coverage is 100%, so the schema already documents all three parameters. The description repeats the locale omission behavior and clarifies documentId's role, but adds no new syntax, format, or edge-case details beyond what the schema provides. Baseline 3 is appropriate when the schema does the heavy lifting.

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?

The description states a specific verb ('Throw away') and resource ('unpublished draft changes of one item') with clear scope ('in one locale'). It explicitly differentiates from siblings by naming trash_content for never-published content and restore_version for rolling back to older versions, so an agent can select it without opening other schemas.

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?

It provides explicit when-to-use context (discard draft to fall back to published), when-not (refused for never-published content — use trash_content instead), and an alternative for a related goal (restore_version for older versions). Nothing is left to inference.

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