Skip to main content
Glama

docugen_discard_changes

Throw away the open edit session and restore the content as it was before your first edit. Pass the revision from docugen_get_document: if a human edited the document since your session opened, the call is refused instead of discarding their edit.

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>",
      "expectedRevision": "<expectedRevision>"
    },
    "name": "docugen_discard_changes"
  }
}

Input Schema

NameRequiredDescriptionDefault
documentIdYesDocument id
expectedRevisionYesThe revision returned by docugen_get_document

Schema Changelog

Changes observed during successful MCP inspections.

No schema history has been recorded yet.

TDQS

A4.3/5.0
Behavior4/5

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

With no annotations, the description carries the full burden and does real work: it declares the operation destructive (content is thrown away), and discloses a concurrency guard — the call is refused rather than clobbering a human's newer edit. It omits whether the refusal is an error vs. a soft result and whether the session survives a refusal.

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?

Two sentences, zero filler. The destructive action is stated first and the guard condition second, so an agent skimming the opening clause already knows what the call costs.

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 two-parameter mutation with no annotations and no output schema, the description covers the essential risk and the precondition. What is missing is the post-call state — whether the edit session is closed, and what the agent should do after a refusal.

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

Parameters5/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 more by explaining the semantics of expectedRevision — it is a concurrency token whose mismatch causes refusal, not just a lookup value. That tells the agent why it must fetch the document first rather than passing a stale id.

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?

States a specific verb and resource: discards the open edit session and rolls content back to its pre-first-edit state. That is far more precise than 'revert' or 'undo', but it never distinguishes itself from the sibling docugen_restore_document, which an agent could plausibly reach for instead.

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?

Gives a clear trigger (abandoning an edit session) and a concrete prerequisite: pass the revision obtained from docugen_get_document. It does not name any alternative tool or state an explicit when-not, so the routing guidance is implicit rather than complete.

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