Skip to main content
Glama

dForms

Discard unpublished edits

discard_draft
DestructiveIdempotent

Throw away the unpublished draft (everything saved with update_form since the last publish), so the form goes back to what is live now. This is how to undo or drop changes that were not published. What respondents see does not change. The draft cannot be recovered, so it is best confirmed with the user first. With no draft pending it changes nothing. revert_form rolls back something already published.

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

Input Schema

NameRequiredDescriptionDefault
form_idYesThe form id, from list_forms or get_form.
workspace_idNoThe workspace this call acts in: an id from list_my_workspaces. Required for a person signed in with several workspaces and for staff of this deployment; optional with an API key or with only one workspace.
expected_updated_atNoRecommended: the updated_at you last read, so you only throw away the draft you saw.

Output Schema

NameRequiredDescriptionDefault
formYes
discardedYesTrue when a draft was thrown away; false when there was none.
workspaceYesThe workspace this call acted in, to compare with the one the user means.
last_published_atYesWhen publish_form last made a draft live. Null when publish_form never ran: the form serves what it was created with, which is an empty form when is_live is false.
previous_published_atYesWhen the version revert_form would bring back went live. Null when there is nothing to revert to.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.6/5.0
Behavior5/5

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

Annotations already declare destructiveHint=true and idempotentHint=true, but the description adds context the annotations cannot: the data is unrecoverable, respondent-facing content is unaffected, and confirmation with the user is advised beforehand. Those are exactly the facts an agent needs before invoking an irreversible discard.

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

Conciseness4/5

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

The irreversible action and its consequence are front-loaded, and the sibling contrast closes it cleanly. There is minor redundancy between 'Throw away the unpublished draft' and 'undo or drop changes that were not published', but no filler sentences.

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, three-parameter tool with an output schema and full annotation coverage, the description covers the remaining gaps: irreversibility, blast radius (draft only, not live content), no-op behavior, and user-confirmation etiquette. Nothing needed to call it correctly 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 form_id, workspace_id and expected_updated_at are already documented at the field level. The description adds no syntax or format detail beyond implying the draft is scoped to the last publish; baseline 3 applies when the schema carries the parameter burden.

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 and resource ('Throw away the unpublished draft') and pins down the scope precisely ('everything saved with update_form since the last publish'), ending with the resulting state ('the form goes back to what is live now'). It also names the sibling it is not (revert_form), so an agent can distinguish it 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 Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Gives explicit when-to-use guidance ('This is how to undo or drop changes that were not published') and an explicit contrast with the nearest alternative ('revert_form rolls back something already published'). It also describes the no-draft edge case as a harmless no-op, removing ambiguity about when calling is pointless.

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