Skip to main content
Glama

Discard an edit from a run’s Edit set

discard_edit
Destructive

Remove one edit from a run’s Edit set without applying it — one the user rejected; every other edit stays. Its string keeps its current text. Refused RUN_EDIT_NOT_IN_EDIT_SET (it was replaced, applied or discarded meanwhile: read get_edit_set again), RUN_EDIT_HANDED_BACK (a Source string edit a failed Reconciliation handed back) and JOB_SUPERSEDED. When referring to a project or language in your reply to the user, use its name and locale (e.g. "French (fr-FR)") — ids (UUIDs) are for tool calls only, never show them to the user.

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": {
      "runId": "<runId>",
      "editId": "<editId>"
    },
    "name": "discard_edit"
  }
}

Input Schema

NameRequiredDescriptionDefault
runIdYesRun id, from get_workflow_run or list_workflow_runs
editIdYesThe edit, from get_edit_set

Output Schema

NameRequiredDescriptionDefault
discardedYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changed
    • changedInput schema / $schema
      Previous value: -"http://json-schema.org/draft-07/schema#"New value: +"https://json-schema.org/draft/2020-12/schema"
    • changedOutput schema / $schema
      Previous value: -"http://json-schema.org/draft-07/schema#"New value: +"https://json-schema.org/draft/2020-12/schema"
  2. Added

TDQS

A4.4/5.0
Behavior5/5

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

Annotations already flag destructiveHint=true, and the description goes well beyond them: it discloses that the underlying string keeps its current text, that sibling edits survive, and it names the three refusal codes (RUN_EDIT_NOT_IN_EDIT_SET, RUN_EDIT_HANDED_BACK, JOB_SUPERSEDED) with the recovery step of re-reading get_edit_set. That is the kind of failure-mode detail structured fields cannot carry.

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 core behavior and refusal modes are front-loaded and densely worded with no filler. The trailing sentence about naming projects and locales in user replies is a global style instruction rather than tool-specific information, so it dilutes focus slightly.

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?

With an output schema present, return values need no explanation, and the description covers the mutation's effect, the survival of other edits, and all stated refusal paths. Nothing an agent needs in order to call this 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 coverage is 100% and both parameters document their source (get_workflow_run/list_workflow_runs and get_edit_set), so the schema does the heavy lifting. The description adds only the qualifier that the edit is a user-rejected one, which is context about validity rather than new meaning for runId/editId.

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?

"Remove one edit from a run's Edit set without applying it" is a specific verb plus resource with an explicit scope contrast to applying, and "every other edit stays" pins down the blast radius. An agent can distinguish this from apply_edit_set without opening either 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?

The clause "one the user rejected" gives the selecting condition and "without applying it" separates it from the apply path. It stops short of naming apply_edit_set as the alternative or stating prerequisites, so guidance is clear but not fully enumerated.

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.