Skip to main content
Glama

retire_doc

Idempotent

Mark a continuity document OBSOLETE. Nothing is deleted: the document keeps its id, its full content, its version and its digest, and read_doc still returns it, flagged retired, with the reason.

Instructions

Mark a continuity document OBSOLETE. Nothing is deleted: the document keeps its id, its full content, its version and its digest, and read_doc still returns it, flagged retired, with the reason. list_docs and the startup scan keep it too, after the current documents, with retired_at and what replaced it. A retired drop is not an unhandled drop. This is document control as ISO 7.5.3 describes it - issue the revision, mark the prior copy obsolete, retain it - and it is the document-store counterpart of revise_memory superseding a layer entry. THE STORE HAS NO DELETE, BY DESIGN. Use for genuine litter: tombstones, merged staging documents, test scratch. Reversible: write_doc on the same id brings it back into the working view.

Input Schema

NameRequiredDescriptionDefault
doc_idYesDocument id to mark obsolete.
reasonYesWhy it is obsolete. Required, at least 10 characters. Drops only.
sourceNoSource tag - which host produced this write. One name on every write since 2026-09-27.
exchangeNoThe exchange (turn) this write belongs to, counting from 1. A write for exchange n while exchange n-1 was never appended is refused by the session graph until n-1 is appended.
retired_byNoAlias of `source` (the older name, kept one release). Prefer `source`.
session_idNoTranscript session id.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed4 schema fields changedv0.2.2
    • changedInput schema / properties / exchange / description
      Previous value: -"The exchange (turn) this write belongs to, counting from 1. A write for exchange n while exchange n-1 was never appended is flagged by the session graph."New value: +"The exchange (turn) this write belongs to, counting from 1. A write for exchange n while exchange n-1 was never appended is refused by the session graph until n-1 is appended."
    • changedInput schema / properties / reason / description
      Previous value: -"Why it is obsolete, e.g. 'merged into threads/income-transition.md'. Recorded on the document and shown by read_doc."New value: +"Why it is obsolete. Required, at least 10 characters. Drops only."
    • changedInput schema / properties / session_id / description
      Previous value: -"Your transcript session id from emet_session_open. The session graph reads this session's state before the write and returns `session_graph.next` - the next step."New value: +"Transcript session id."
    • changedInput schema / required
      Previous value: -[
      -  "doc_id"
      -]New value: +[
      +  "doc_id",
      +  "reason"
      +]
  2. First observedv0.1.0

TDQS

A4.4/5.0
Behavior5/5

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

Annotations already flag idempotentHint and destructiveHint=false, but the description goes far beyond: it enumerates exactly what is preserved (id, content, version, digest), how read_doc and list_docs surface the retired state (retired_at, replacement), and that the operation is reversible via write_doc on the same id. This is exactly the added context the bar asks for.

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 action and its non-destructive nature are front-loaded, and most sentences carry real routing or behavioral information. The ISO 7.5.3 framing and 'a retired drop is not an unhandled drop' add flavor that is less essential, keeping it just below top marks.

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 no output schema, the description compensates by describing the resulting state (flagged retired, retained in listings, reversible). Combined with annotations that align with the described behavior, an agent has everything needed to call this correctly and predict the outcome.

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 doc_id, reason, source, exchange, and the retired_by alias. The description only echoes the reason ('with the reason') without adding format or constraint detail, so the 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?

States a specific verb (mark OBSOLETE) and resource (continuity document), and explicitly distinguishes itself from siblings: read_doc still returns it, list_docs keeps it, write_doc restores it, and revise_memory is named as the analogous layer operation. An agent can route to it 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 Guidelines4/5

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

Gives concrete when-to-use cases ('genuine litter: tombstones, merged staging documents, test scratch') and rules out the delete mental model with 'THE STORE HAS NO DELETE, BY DESIGN'. It stops short of explicitly contrasting against a near-alternative tool for the same state change, so it is strong context rather than full when/when-not routing.

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