replace_tab_markdown
Replace a specific tab's entire content with compiled markdown while protecting existing tables, images, chips, and footnotes; use dry-run to validate before writing.
Instructions
Replace the entire content of a document tab with compiled markdown.
Use this tool when you need to completely replace a tab's content with new markdown. tab_id is required and must identify an existing tab.
The structural guardrail refuses writes that would silently lose tables, images, chips, or footnotes unless allow_structural_loss=true.
Set dry_run=true to validate and preview without writing.
The returned payload (applied, revisions, structural_match, input_blocks/ post_blocks) is itself the confirmation the write landed — it already re-read the document and diffed it against the input. A follow-up read_document to double-check is a redundant round-trip; only re-read if you need the content for a subsequent step.
Errors: UNSUPPORTED_MARKDOWN – markdown contains an unsupported construct INVALID_INPUT – structural guardrail refused TAB_NOT_FOUND – tab_id missing or not in document REVISION_CONFLICT – document changed mid-call; re-read and retry SUGGESTIONS_PRESENT – tab has pending suggested edits; accept/reject them in the Docs UI first, then retry
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": {
"doc_id": "<doc_id>",
"tab_id": "<tab_id>",
"markdown": "<markdown>"
},
"name": "replace_tab_markdown"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| doc_id | Yes | ||
| tab_id | Yes | ||
| dry_run | No | ||
| markdown | Yes | ||
| allow_structural_loss | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||