Skip to main content
Glama

palinode_correction_apply

Destructive

Apply a confirmed correction to a memory, saving the replacement and retiring the original with superseded_by, while refusing if the target changed since preview.

Instructions

Apply a correction previewed by palinode_correction_preview. Requires confirm=true and the expect_revision that preview returned; a target that changed since the preview, or a ref matching more than one memory, is refused with what it found rather than resolved by guesswork. Writes only through the existing validated path — the replacement is saved and the original is archived with superseded_by, so the original stays on disk, in git and retrievable as history. An ordinary later observation must NOT be routed here: this is the explicit, confirmed path, and it is the only one that retires anything. applied: "partial" means the replacement was saved and the original was NOT retired — do not re-run the correction; run the complete_command it returns.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
actionNosupersede or retire. Derived from `replacement` when omitted.
reasonNoWhy. Recorded in the history sibling and the commit subject.
targetYesMemory to correct, exactly as previewed.
confirmYesMust be true. Nothing is written without it.
projectNoProject scope for the replacement.
claim_idNoNarrow the correction to one '<!-- fact:id -->' claim inside the target.
backed_byNoRecords supporting the REPLACEMENT (category/slug refs). The superseded original is never among them.
replacementNoThe text that stands instead. Omit to retire with no successor.
candidate_idNoThe candidate this came from; it is marked applied in the queue.
expect_revisionYesThe revision palinode_correction_preview returned. A mismatch is refused.
allow_content_lossNoExplicitly permit dropping the original text listed by preview.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv0.22.0

TDQS

A4.8/5.0
Behavior5/5

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

Annotations already declare destructiveHint=true, readOnlyHint=false, non-idempotent, but the description adds substantial context beyond them: the original is archived with superseded_by and stays retrievable in git/history, stale revisions and ambiguous refs are refused rather than guessed, and the partial outcome is explained. This is exactly the extra behavioral detail annotations 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?

Front-loads the core action and is dense with no filler, but the middle sentence about 'existing validated path' and retrieval is somewhat sprawling for a description that must be scanned quickly. Still, nearly every clause earns its place by covering a distinct behavior.

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?

Despite having no output schema, the description supplies the critical return-value semantics for the partial case and the follow-up command to run, plus refusal behavior and the archive/retain guarantee. An agent has everything needed to call this correctly and interpret the outcome.

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 adds real meaning: confirm must be true or nothing is written, expect_revision must match what preview returned, target must match the previewed ref, and partial replies signal a specific recovery action. The enum/derived action and allow_content_loss are left to the schema.

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+resource (apply a correction) scoped precisely to the preview produced by palinode_correction_preview, and explicitly distinguishes itself from the preview, dismiss, and undo siblings as the only retiring path. An agent can tell what this does and which sibling precedes 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 preconditions (confirm=true, matching expect_revision) and an explicit exclusion: 'An ordinary later observation must NOT be routed here.' It also names the alternative flow for the partial outcome ('do not re-run the correction; run the complete_command it returns'), covering both when-to-use and when-not.

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