tabularia_write_draft
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
| Name | Required | Description | Default |
|---|---|---|---|
| edits | Yes | 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. | |
| draftId | Yes | The Draft to write into, from tabularia_create_draft or tabularia_list_drafts. | |
| project | No | Which 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. | |
| requestId | No |