Skip to main content
Glama

tabularia_write_draft

Destructive

Write paragraphs into a Draft, whole, so the Writer can read them in Markup beside what the Draft came from and merge a difference at a time. This is the vehicle for reimagining a passage — a different tense, another point of view — and for any change that crosses a paragraph break. Any Draft may be written, showing or not, yours or the Writer's, except one that is locked or an Editor's review, and only the paragraphs it covers. The Base Draft is the Manuscript itself and may be written too, when the Writer asked for the change in their text: a Snapshot is taken first, the change carries no Markup, and each paragraph needs readText, its text exactly as you read it. A Draft or paragraph that changed since you read it is refused rather than overwritten — read it again and write against what it says now. Write each Block's wording in Markdown: plain text strips every italic and every link, and Markup then reads them as your deletions. This is also how to add, change or remove a link: write the paragraph with words where the link should be, or with the words alone to take it off. A paragraph's own Footnotes are named by their order in it: write [^1] where its first Footnote reference should stand, [^2] for its second, and leave out any you mean to remove; markdown that names none drops them all, so write each one the paragraph keeps. A link's address must be a full web address starting https:// or http://, or mailto: for email; anything else is refused rather than kept as bare words. This is also how to set a paragraph's Section or Subsection number in place, many paragraphs a call: give an edit sectionLevel, sectionNumber, or both, with no markdown, and removePrefix to take a printed marker such as "[2] " off its words in the same edit. { blockId, sectionLevel: "subsection", sectionNumber: 2, removePrefix: "[2] " } makes the paragraph Subsection 2 of the Section above. The Book shows the numbers only where its Section numbers are on, which tabularia_set_headers_and_margins sets. Named Draft writes return an actionId for targeted tabularia_undo_action. Supply a stable requestId from the first call for safe retries, on the Base as in a Draft; undo preserves unrelated later paragraphs and refuses affected conflicts. Base paragraph rewrites retain their existing Snapshot recovery, and a Base write that sets numbering or a marker also returns previous: edits in this tool's own shape that put each paragraph's level, number, and marker back. On a Manuscript shared with the Writer as an Editor, every Draft is the Author's and is refused: offer the change with tabularia_add_comment and replacementText instead.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "draftId": "<draftId>",
      "edits": "<edits>"
    },
    "name": "tabularia_write_draft"
  }
}

Input Schema

NameRequiredDescriptionDefault
editsYesThe changed Blocks, each { blockId, markdown?, readText?, sectionLevel?, sectionNumber?, removePrefix?, addPrefix? }, with markdown, a Section field, or both. Markdown so emphasis and links survive: plain text would strip every italic and every link the paragraph had. Write [^n] for each of the paragraph's own Footnotes it keeps, by their order in it. A link is [words](address), and its address must be a full https://, http:// or mailto: address; anything else is refused. readText is the paragraph's text exactly as you read it, and rewriting a Base paragraph's markdown needs it, so a paragraph changed since your read is refused rather than overwritten. Up to 5,000 edits a call.
draftIdYesThe Draft to write into, from tabularia_create_draft or tabularia_list_drafts.
projectNoWhich open Project to use, by title, id, or the Studio address the Writer sees (a tabularia.app/studio/ URL or its six-character code — the Writer’s tab URL is enough; there is no need to look at the page). Omit it when only one Project is open in Studio.
requestIdNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • changedInput schema / properties / edits / description
      Previous value: -"The changed Blocks, each { blockId, markdown?, readText?, sectionLevel?, sectionNumber?, removePrefix?, addPrefix? }, with markdown, a Section field, or both. Markdown so emphasis and links survive: plain text would strip every italic and every link the paragraph had. A link is [words](address), and its address must be a full https://, http:// or mailto: address; anything else is refused. readText is the paragraph's text exactly as you read it, and rewriting a Base paragraph's markdown needs it, so a paragraph changed since your read is refused rather than overwritten. Up to 5,000 edits a call."New value: +"The changed Blocks, each { blockId, markdown?, readText?, sectionLevel?, sectionNumber?, removePrefix?, addPrefix? }, with markdown, a Section field, or both. Markdown so emphasis and links survive: plain text would strip every italic and every link the paragraph had. Write [^n] for each of the paragraph's own Footnotes it keeps, by their order in it. A link is [words](address), and its address must be a full https://, http:// or mailto: address; anything else is refused. readText is the paragraph's text exactly as you read it, and rewriting a Base paragraph's markdown needs it, so a paragraph changed since your read is refused rather than overwritten. Up to 5,000 edits a call."
  2. Changed9 schema fields changed
    • changedInput schema / properties / edits / description
      Previous value: -"The rewritten Blocks, each { blockId, markdown, readText? }. Markdown so emphasis and links survive: plain text would strip every italic and every link the paragraph had. A link is [words](address), and its address must be a full https://, http:// or mailto: address; anything else is refused. readText is the paragraph's text exactly as you read it, and writing the Base Draft needs it for every Block, so a paragraph changed since your read is refused rather than overwritten."New value: +"The changed Blocks, each { blockId, markdown?, readText?, sectionLevel?, sectionNumber?, removePrefix?, addPrefix? }, with markdown, a Section field, or both. Markdown so emphasis and links survive: plain text would strip every italic and every link the paragraph had. A link is [words](address), and its address must be a full https://, http:// or mailto: address; anything else is refused. readText is the paragraph's text exactly as you read it, and rewriting a Base paragraph's markdown needs it, so a paragraph changed since your read is refused rather than overwritten. Up to 5,000 edits a call."
    • addedInput schema / properties / edits / items / properties / addPrefix
      Added value: +{
      +  "description": "Text to put back at the start of the paragraph, unmarked: the inverse of removePrefix, as a previous entry returns it. Not with markdown.",
      +  "maxLength": 200,
      +  "minLength": 1,
      +  "type": "string"
      +}
    • changedInput schema / properties / edits / items / properties / blockId / description
      Previous value: -"The Block to rewrite, from tabularia_read_window. Name each Block once, with every change to it in that one edit."New value: +"The Block to change, from tabularia_read_window. Name each Block once, with every change to it in that one edit."
    • changedInput schema / properties / edits / items / properties / readText / description
      Previous value: -"The Block's text exactly as you read it. Required for every Block when writing the Base Draft."New value: +"The Block's text exactly as you read it. Required with markdown when writing the Base Draft; optional otherwise, and honored when sent."
    • addedInput schema / properties / edits / items / properties / removePrefix
      Added value: +{
      +  "description": "Exact text the paragraph begins with, such as \"[2] \", taken off its words in the same edit. A paragraph that does not begin with it is refused, unless it already carries the sectionLevel and sectionNumber this edit asks for. Not with markdown.",
      +  "maxLength": 200,
      +  "minLength": 1,
      +  "type": "string"
      +}
    • addedInput schema / properties / edits / items / properties / sectionLevel
      Added value: +{
      +  "description": "How the paragraph stands in Section numbering: \"section\", \"subsection\", \"subsubsection\", or \"none\" to leave it unnumbered, continuing the Section above. Changing the level drops a number the paragraph carried unless sectionNumber sets one. Only a body paragraph with words takes a level.",
      +  "enum": [
      +    "section",
      +    "subsection",
      +    "subsubsection",
      +    "none"
      +  ],
      +  "type": "string"
      +}
    • addedInput schema / properties / edits / items / properties / sectionNumber
      Added value: +{
      +  "description": "The number the paragraph carries at its level, set rather than counted: a Section is Section N and the Sections after it count on from N; a Subsection is part N of the Section above, and the Subsections after it count on from N. Only a Section or a Subsection carries one. null counts the paragraph again.",
      +  "minimum": 1,
      +  "type": [
      +    "integer",
      +    "null"
      +  ]
      +}
    • changedInput schema / properties / edits / items / required
      Previous value: -[
      -  "blockId",
      -  "markdown"
      -]New value: +[
      +  "blockId"
      +]
    • addedInput schema / properties / edits / maxItems
      Added value: +5000
  3. First observed

TDQS

A4.4/5.0
Behavior5/5

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

Beyond destructiveHint=true, it discloses the exact destructive mechanics: conflicts are refused rather than overwritten, Base writes take a Snapshot first, prefix removal drops a printed marker from the words, and markdown naming no Footnotes 'drops them all'. It also describes return behavior an agent needs for recovery — an actionId for tabularia_undo_action, the previous numbering/marker payload, and requestId retry semantics.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness3/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The purpose is front-loaded, but the body is one undifferentiated block of dense prose that is hard to scan. Several rules are stated twice — Markdown stripping every italic and link appears in both the description and the edits schema, as does the https/mailto address rule — so not every sentence earns its place.

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, 4-parameter write tool with no output schema, it covers permissions, conflict behavior, undo/recovery paths, numbering side effects, and the alternative tool when a write is disallowed. An agent has everything needed to call it correctly and recover from failure.

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?

At 75% schema coverage the schema carries most definitions, but the description adds real meaning: readText is mandatory with markdown only on the Base, requestId must be stable from the first call for safe retries, and a concrete worked example shows sectionLevel/sectionNumber/removePrefix combining in one edit. It adds less for draftId and project, which the schema already explains.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The opening sentence names a specific verb and resource ('Write paragraphs into a Draft, whole') and scopes it ('only the paragraphs it covers'), which an agent can distinguish from comment/sheet tools. The purpose is stated in metaphor-heavy prose ('the vehicle for reimagining a passage'), so the crisp operational statement only emerges partway through, keeping it just short of a 5.

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 use cases (tense or point-of-view rewrites, any change crossing a paragraph break, links, Footnote lists, Section numbering) and explicit exclusions ('except one that is locked or an Editor's review'). It also names the fallback for the refused case: 'offer the change with tabularia_add_comment and replacementText instead', which routes the agent to the correct sibling.

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