Skip to main content
Glama

Write block(s)

traceable_block_write
Destructive

Insert one or more body blocks at an anchor: after a TraceID (afterItemId), after a [[row N]] anchor (afterOrder, from a document read), or at the start/end of the body (position; default end). The anchor must be a body row: title-page content is written with traceable_segment_write. Returns the created rows with their new row orders, plus a renumbered marker when the insert shifted existing rows (by: rows inserted, rowsShifted: visible body rows that moved; footer rows below are renumbered too but not counted). IMPORTANT: an insert renumbers every row after the anchor, so row orders from earlier reads/responses go stale — re-read before further order-based calls, or anchor by TraceID (immune to renumbering).

Input Schema

NameRequiredDescriptionDefault
positionNoFallback position in the body when no anchor is given (default end)
afterOrderNoInsert after this row order (the [[row N]] anchor)
documentIdYesThe document UUID
trmContentYesTraceable Markdown (TrMD). GitHub-flavored Markdown plus [[directive]] blocks — see traceable_capabilities. Read-only annotations ([[row]]/[[document]]) are rejected.
afterItemIdNoInsert after the row with this TraceID (e.g. FR-003)
baseRevisionNoThe revision (meta.revision) from the traceable_doc_read, or the previous write, this change is based on. When given, the write is refused with nothing changed if the document has changed since, so you never overwrite edits you have not seen. Each write returns the current revision. The revision tracks the document's content rows, so changes that touch no row (its name and other metadata, the reference list, Test Plan entries) return it unchanged. A revision is an opaque value: compare it whole, never read meaning into its parts (they are not a counter).

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • addedInput schema / properties / baseRevision
      Added value: +{
      +  "description": "The revision (meta.revision) from the traceable_doc_read, or the previous write, this change is based on. When given, the write is refused with nothing changed if the document has changed since, so you never overwrite edits you have not seen. Each write returns the current revision. The revision tracks the document's content rows, so changes that touch no row (its name and other metadata, the reference list, Test Plan entries) return it unchanged. A revision is an opaque value: compare it whole, never read meaning into its parts (they are not a counter).",
      +  "type": "string"
      +}
  2. First observed

TDQS

A4.6/5.0
Behavior4/5

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

Annotations already declare destructiveHint=true and idempotentHint=false, so safety is partly covered. The description goes well beyond them by disclosing the non-obvious renumbering side effect, its scope (footer rows too but not counted), the `renumbered` marker shape (`by`, `rowsShifted`), and the resulting staleness of prior row orders. It stops short of stating permission/auth requirements.

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 anchor options, and every clause carries operational information (return shape, renumbering warning). It is dense and long-sentenced, so it is not maximally scannable, but there is little filler.

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?

For a destructive multi-param mutation with no output schema, the description covers the return payload (created rows, new row orders, renumbered marker), the stale-order hazard, and where the analogous write tool lives. Nothing essential to invoking it correctly is missing.

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: it maps afterItemId to a TraceID anchor, afterOrder to the [[row N]] anchor, clarifies position is only a fallback (default end), and notes that read-only [[row]]/[[document]] directives are rejected. That exceeds what the field descriptions alone convey.

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 opens with a specific verb and resource ('Insert one or more body blocks') and enumerates the three anchor modes (afterItemId, afterOrder, position). It actively distinguishes itself from the sibling traceable_segment_write by stating that title-page content is written there instead.

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?

It gives explicit selection criteria for each anchor variant, names the alternative tool for title-page content, and adds operational guidance ('re-read before further order-based calls, or anchor by TraceID'). An agent can pick the right tool and the right anchor without inference.

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.

Resources