Skip to main content
Glama

Huddle

discard_draft

Idempotent

Throw away the document's open draft. Use it to drop unpublished changes; the published text and every revision stay as they are. Returns the new draft_version, or a conflict when the draft has changed since the version you name.

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

Input Schema

NameRequiredDescriptionDefault
idYesthe document id, from list_docs or search_docs
expect_draft_versionYesthe draft_version from get_doc or from your last save

Output Schema

NameRequiredDescriptionDefault
idYesThe document id.
has_draftYesWhether a draft is now open.
draft_differsYesWhether it differs from the published body.
draft_versionYesThe version acknowledged by this mutation.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.4/5.0
Behavior4/5

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

Annotations already declare mutating-but-idempotent, closed-world behavior, so the bar is lower; the description adds the important facts that published text and revisions are untouched and that a version mismatch produces a conflict. It stops short of saying whether a discarded draft is recoverable.

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?

Three short sentences, front-loaded with the action, then the side-effect scope, then the return/conflict behavior. No filler or restated field names.

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?

With an output schema present, return values need no explanation, and the description covers mutation semantics, preserved data, and the conflict case. The one gap is that the irreversibility of discarding is implied by 'throw away' rather than stated.

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 earns a bump by explaining the purpose of expect_draft_version as the concurrency guard that yields a conflict 'since the version you name' – meaning the schema does not supply. It likewise frames id as the document identifier, consistent with the schema's examples.

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 ('Throw away') and resource ('the document's open draft') and immediately delimits scope: 'the published text and every revision stay as they are.' That contrast makes it distinguishable from publish_draft and save_draft without opening their schemas.

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?

'Use it to drop unpublished changes' gives a clear condition for choosing this tool, and the preservation clause implies when it is not appropriate. It does not explicitly name a sibling alternative (e.g., save_draft for keeping changes), so it stops short of full when/when-not routing.

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.

Resources