Skip to main content
Glama

Correct a fact

correct_fact

Replace a wrong recorded fact by supplying its hash, corrected value, reason, and operation ID; the old fact stays in history as superseded.

Instructions

Use when a recorded fact is wrong and you know the right value. Give the hash of the fact to replace and a reason. The old fact stays in history, marked as superseded, so the correction can itself be undone. When the result includes a receipt link, include it when you tell a person about the change, so they can check it and undo it.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
valueYesThe corrected value. Any JSON.
reasonYesWhy the earlier fact was wrong.
evidenceNoWhere the fact came from, so a person can check it.
entity_idYesStable ID of the thing the fact is about, such as customer:42 or ticket:T-1009. Not a display name.
predicateNoPredicate of the corrected fact. Defaults to the predicate of the fact being corrected.
supersedesYesHash of the fact being corrected, from get_entity or an earlier write.
observed_atNoWhen the corrected value was observed, RFC 3339.
operation_idYesYour ID for this one write, 8-200 characters. Reuse it when retrying the same write so it is not recorded twice. Never reuse it for a different write.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.6.0

TDQS

A4.4/5.0
Behavior5/5

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

Annotations cover only the safety hints (non-read-only, non-destructive, closed-world), while the description adds the non-obvious behavior: the old fact remains in history marked superseded and the correction itself can be undone. It also tells the agent to surface the receipt link to a human so the change is verifiable and reversible.

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 tight sentences with the usage trigger front-loaded, then the mutation mechanics, then the human-facing receipt guidance. No filler or repetition of schema content.

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 an eight-parameter mutation with a nested evidence object and no output schema, the description covers the essential safety and reversibility context and hints at the receipt link in the result. It leaves the return shape and idempotency mechanics to the schema, which is acceptable but not exhaustive.

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 the schema already documents all eight parameters including supersedes, reason, and operation_id. The description only restates the supersedes hash and reason at a high level, adding no format or edge-case detail beyond the schema. Baseline 3 applies.

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?

The description states a specific verb (correct/replace) and resource (a recorded fact), plus the corrective scope: the old fact is superseded rather than deleted. This cleanly separates it from siblings like record_fact (new fact) and retract_fact (removal), without needing to open 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?

"Use when a recorded fact is wrong and you know the right value" gives a clear trigger condition that implicitly excludes retraction (when a fact is no longer true) and fresh recording. It stops short of explicitly naming those sibling alternatives, so it is strong but not fully routing.

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