Documentation Index
Fetch the complete documentation index at: https://superdoc-caio-sd-2929-configurable-toolbar.mintlify.app/llms.txt
Use this file to discover all available pages before exploring further.
Workflow
Every interaction follows the same pattern: open, read or edit, save, close.superdoc_openloads a.docxfile and returns asession_idsuperdoc_get_contentreads the current document andsuperdoc_searchfinds stable handles or addresses- Intent tools use
session_idplusactionto edit, format, create, comment, review track changes, or run batched mutations superdoc_savewrites changes to disksuperdoc_closereleases the session
Efficient patterns
Create multiple sections at once
Usesuperdoc_edit with type: "markdown" to insert structured content in a single call. It parses markdown into proper document nodes: headings, paragraphs, bold, italic, and lists.
| Markdown | Document node |
|---|---|
# Heading | Heading 1 |
## Heading | Heading 2 |
**text** | Bold |
*text* | Italic |
- item | Bullet list |
1. item | Numbered list |
Format multiple items at once
Usesuperdoc_mutations with format.apply steps to apply formatting across the document in one atomic call.
When to use which tool
| Task | Best tool |
|---|---|
| Insert one paragraph or heading | superdoc_create |
| Insert multiple sections with structure | superdoc_edit with type: "markdown" |
| Replace text across the whole document | superdoc_search + superdoc_edit |
| Rewrite a whole paragraph | superdoc_get_content + superdoc_edit with block ref |
| Apply formatting to known text | superdoc_search + superdoc_format |
| Apply formatting to all nodes of a type | superdoc_mutations with format.apply |
| Multiple text changes that must succeed together | superdoc_mutations with atomic: true |
| Review or resolve tracked changes | superdoc_track_changes |
Targeting
Every editing tool needs a target telling the API where to apply the change. There are three ways to get one:- From blocks data: Each block has a
ref(pass tosuperdoc_editorsuperdoc_format) and anodeId(for buildingatpositions withsuperdoc_create). - From
superdoc_search: Returnshandle.refcovering the matched text. Use search when you need to find text patterns, not when you already know which block to target. - From
superdoc_create: ReturnsnodeIdandreffor the new node. For creating multiple sections or blocks at once, prefersuperdoc_editwithtype: "markdown"instead of multiplesuperdoc_createcalls. Re-fetch blocks after create to get a fresh ref before formatting.
Common operations
Replace text everywhere
Rewrite a paragraph
Add content after a heading
Format text
Create a list
Create paragraphs first, then convert:Batch edits atomically
Usesuperdoc_mutations when you need multiple changes that must succeed or fail together. Supported step types include text.rewrite, text.delete, format.apply, create.heading, create.paragraph, and create.table.
Tracked changes
Actions that support tracked edits use the underlying Document API’schangeMode: "tracked" option. Review or resolve tracked edits with superdoc_track_changes:
Tips
- Format calls must be sequential. Each call invalidates all outstanding refs. Format one block, re-fetch, then format the next.
- Search patterns are plain text. Do not include markdown markers like
#or**. - Pass structured objects, not JSON strings. Fields like
at,target, andinlineexpect objects. - On a blank document, omit positional
aton the firstsuperdoc_create. Then fetch blocks for nodeIds before subsequent inserts.
Related
- MCP overview: setup and tool reference
- Debugging: inspect and troubleshoot MCP tool calls
- Best practices: general AI agent patterns

