Skip to main content
Glama

retractFact

Records that a fact is no longer true by closing its current value while preserving history; the slot then reads empty. Use it when a status or preference changed with no replacement.

Instructions

Close the current value of a fact slot — the scalar counterpart to unrelate. Records that a fact STOPPED being true (a status that no longer holds, a preference that changed with no replacement) by retracting it: it drops out of current reads but its history is PRESERVED (unlike forget, which deletes the row). The slot then reads as EMPTY — retraction does NOT fall back to an earlier value. Identify the value by its facts/{uid} or by the (subject, stateKey) pair (which closes the slot's single open value). To set a different value instead, just write it with fact() — a later write supersedes the prior.

Input Schema

NameRequiredDescriptionDefault
factNoThe fact to retract: facts/{uid} or a bare ULID (as returned by fact() or get). Use THIS or a (subject, stateKey) pair, not both.
scopesNoScopes to search when identifying the slot by (subject, stateKey): project, personal, team. Defaults to project+personal.
subjectNoSubject entity whose slot to close: entities/{uid}, a bare ULID, "self", or a display name. Provide with stateKey as an alternative to fact.
stateKeyNoSlot address to close, e.g. state.task.status, preference.coffee.milk. Provide with subject.

Output Schema

NameRequiredDescriptionDefault
nameYesResource name of the retracted fact.
statusYesAlways "retracted" on success: the value is closed but its history is preserved.
retractedAtYesThe instant the fact was retracted (RFC 3339 UTC).

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

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 most of it well: history is PRESERVED (unlike forget, which deletes the row), the value drops out of current reads, and critically the slot reads as EMPTY with no fallback to an earlier value. It stops short of stating failure/idempotency behavior (e.g. what happens if the slot has no open value, or if the same retraction is issued twice).

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-loaded with the core action and its counterpart, then consequences, then alternatives — a sensible order. It runs long for what it says and leans on capitalization for emphasis, but no sentence is filler.

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?

An output schema exists, so return values need no explanation, and the description covers side effects, data retention, and read-visibility well. The remaining gap is edge-case behavior — empty slots, repeated retractions, and failure modes — which matters for a mutation with zero annotation coverage.

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%, so both invocation paths and the oneOf exclusivity are already documented in the schema. The description reinforces the either/or ('Use THIS or a (subject, stateKey) pair, not both') and adds the semantic that the pair closes the slot's single open value, but adds no format or scope guidance beyond what the schema states.

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 ('Close the current value of a fact slot') and immediately positions it against two siblings: the scalar counterpart to unrelate, and distinct from forget (which deletes). An agent can pick this tool over forget/fact/unrelate without opening any 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?

Explicit when-to-use ('a status that no longer holds, a preference that changed with no replacement') and an explicit when-not/alternative: 'To set a different value instead, just write it with fact().' Both identification paths are named, so the agent also knows the two valid invocation modes.

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