Skip to main content
Glama

Write segment

traceable_segment_write
DestructiveIdempotent

Replace a whole segment with the given TrMD — the primary bulk-authoring tool. Existing rows in the segment are soft-deleted (links to them are marked broken), so use traceable_block_write/traceable_block_update for incremental edits. Author multi-column bands with [[column-start count=N]] … [[column-break]] … [[column-end]] (one rich-text cell per column), and ID grids with [[id-header types=id,text,link]] + a label row followed by [[id-row id=…]] rows (link cells take whitespace-separated TraceID names). The title_* segments are the optional title page; writing to them on a document whose title page is switched off stores the content but it will not render until the page is enabled in the app.

Input Schema

NameRequiredDescriptionDefault
segmentYesWhich segment to replace
documentIdYesThe document UUID
trmContentYesTraceable Markdown (TrMD). GitHub-flavored Markdown plus [[directive]] blocks — see traceable_capabilities. Read-only annotations ([[row]]/[[document]]) are rejected.
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?

Even though annotations already declare destructiveHint=true and idempotentHint=true, the description adds the concrete consequence — existing rows are soft-deleted and links to them marked broken — plus the rejection of read-only annotations. This is valuable beyond the flags, though the revision-conflict mechanics live mostly in the schema rather than here.

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 the sibling comparison before drilling into directive syntax. It is dense and fairly long, but nearly every clause carries operational detail an author needs; only the column/grid syntax could plausibly be deferred to traceable_capabilities, which it already references.

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 bulk-write tool with no output schema, the definition covers scope, side effects, alternatives, edge cases, and authoring syntax. An agent has enough to invoke it correctly without further lookup.

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 earns above baseline by explaining trmContent directive syntax ([[column-start]]/[[column-break]]/[[column-end]], [[id-header]]/[[id-row]]) and the title_* segment semantics that the schema only labels as 'Which segment to replace.'

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 — 'Replace a whole segment' — and immediately labels itself 'the primary bulk-authoring tool,' which positions it against the block-level siblings. An agent can distinguish it from traceable_block_write without opening 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 Guidelines5/5

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

Explicitly routes incremental edits to traceable_block_write/traceable_block_update, and explains the title_* edge case (content stores but will not render until the title page is enabled). Both when-to-use and an important exception are covered.

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