Skip to main content
Glama

rename_doc

Reissue a continuity document under a new doc_id. The destination is written first through the normal write path (same redaction, digest, versioning and sha256 read-back), and only then is the old id marked obsolete with retire_doc.

Instructions

Reissue a continuity document under a new doc_id. The destination is written first through the normal write path (same redaction, digest, versioning and sha256 read-back), and only then is the old id marked obsolete with retire_doc. NOTHING IS DELETED: the old id keeps its content and stays readable at its own id, flagged retired with the reason 'Reissued as <new_id>'. list_docs keeps it after the current documents and names the new id in replaced_by. No tombstone document is needed, because the retired original IS the tombstone and it still carries the real content. Refuses if the destination already exists, because a rename onto an occupied id is a merge decision and merges are not guessed.

Input Schema

NameRequiredDescriptionDefault
new_idYesDestination document id. Must not already exist.
old_idYesExisting document id to reissue from. It is retired, not removed.
reasonYesWhy the document is reissued. Required, at least 10 characters.
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.
session_idNoTranscript session id.
updated_byNoAlias of `source` (the older name, kept one release). Prefer `source`.

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."
    • addedInput schema / properties / reason
      Added value: +{
      +  "description": "Why the document is reissued. Required, at least 10 characters.",
      +  "type": "string"
      +}
    • 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: -[
      -  "old_id",
      -  "new_id"
      -]New value: +[
      +  "old_id",
      +  "new_id",
      +  "reason"
      +]
  2. First observedv0.1.0

TDQS

A4.3/5.0
Behavior5/5

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

Annotations only say readOnlyHint=false and destructiveHint=false; the description goes well beyond them by stating nothing is deleted, the old id stays readable, it is flagged retired with reason 'Reissued as <new_id>', and list_docs shows replaced_by. It also discloses the refusal semantics on an occupied destination, which is behavior no structured field carries.

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 mostly disciplined, but the 'No tombstone document is needed' sentence and the closing rationale about merges are discursive justification rather than call-critical instruction. Still, each sentence maps to a distinct behavior an agent should know.

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 a 7-parameter mutation tool with no output schema, it covers destructive-vs-retain semantics, ordering, refusal, and downstream list_docs effects well. What remains unstated is the response shape and whether the destination write is transactional if the retire step fails.

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 seven parameters including old_id/new_id semantics and the exchange/session graph rule. The description reinforces old_id/new_id but adds no new syntax or format detail for the four context parameters (source, exchange, session_id, updated_by). 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 and resource ('Reissue a continuity document under a new doc_id') and immediately distinguishes the operation from a plain rename or delete. It names the collaborating siblings (retire_doc, list_docs) so the agent can place it in the corpus 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 a clear when-not condition ('Refuses if the destination already exists') and explains the internal ordering (destination written first, then retire_doc marks the old id). It references sibling behavior but does not explicitly route to an alternative tool for the merge case, only saying merges are not guessed.

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