WPS Note MCP Skill
Core Operation Mode:
Locate first (outline / search) → Read next → Edit last. All content is exchanged in semantic XML format, and all positioning is based on
(10 alphanumeric characters).
When to Use
- Users mention WPS Notes, WPS Note, cloud notes, or Kingsoft Notes
- Users request to read, edit, search, summarize, or translate note content
- Users need to create notes, manage tags, or organize note libraries
- Need to troubleshoot MCP tool call failures (errors like , )
Not applicable to: Local Markdown file operations, other WPS products like documents/spreadsheets/presentations, or pure conceptual discussions.
Core Concepts
Block Model
- Notes are composed of blocks, each with a unique .
- Block types: , , , , , , (single image/image columns), , , , , .
- blocks (spreadsheets, videos, LaTeX, countdowns, etc.) are read-only placeholders and cannot be edited.
- blocks are voice recording cards (read-only), displayed as in XML. Use the tool to obtain transcribed content.
- Tables must be replaced in full; individual cells cannot be edited. Table cells only support simple blocks (paragraphs, headings, blockquotes, code blocks, horizontal rules, images), and cannot contain nested container blocks like highlight blocks, columns, or tables.
- Container Nesting Restrictions: only supports simple blocks (paragraphs, headings, blockquotes, code blocks, horizontal rules, images), and cannot nest , , or . Each within supports simple blocks and , but cannot nest or .
note_id
- Most tools require to specify the note to operate on.
- Obtain via or ; if users want to operate on the currently open note, directly call to retrieve it.
- can retrieve note metadata (including tags), supporting three modes: single query, batch query (up to 100 notes), and full pagination browsing (//), without needing to read the full content.
XML Input/Output
- All content is sent and received in semantic XML format, using tags such as , -, , , , , , etc.
- Each block-level tag identifies the block_id via the attribute, e.g.,
<p id="aB3kLm9xZq">Content</p>
.
- Important: The / for write operations (such as ) only accepts top-level block IDs (returned by ). The of paragraphs inside containers (, , ) in the XML is for reading reference only and cannot be used for write operations.
- Provide content in XML format when writing; the system automatically converts it to the internal block model. For , the target block is specified by the tool parameter , and it is recommended not to write the in ; if the root block is explicitly written, it must match the target . When using , omit the from block-level tags in the new content, and the system will automatically assign a new .
- Inline marks use semantic tags: , , , , , .
- Tag Writing: can be used in inline content like paragraphs. The text must start with ; multi-level tags are separated by (e.g., ); the id attribute is optional—for existing tags, you can pass the id obtained via , while for new tags, omit the id and the system will automatically create it. Tags are automatically synchronized to the left tag tree. Restrictions: should be placed in the first block (first line) of the note; each level can have a maximum of 20 characters, with up to 10 levels; emojis, spaces, square brackets, and other characters are not supported; cannot be nested inside (tags and links are mutually exclusive). Invalid content will be degraded to plain text and return a warning. After creating a note, insert the tag line before writing the body; if there are no tags after editing an existing note, add them.
- Inline self-closing elements: (emoji),
<latex formula="E=mc^2"/>
(inline formula), (hard line break).
- Style attributes are passed via :
<span fontColor="#C21C13">red text</span>
, <span fontHighlightColor="#FBF5B3">highlighted text</span>
, <span fontSize="16">large text</span>
.
- Colors are constrained by preset palettes; arbitrary hex color values will be silently discarded by the editor. Preset values for various colors:
- (12 colors):
- (9 colors):
- colors (6 bg→border pairs): →、→、→、→、→、→
- (42 colors, including solid and gradient):
- 6 base colors:
- 18 extended solid colors:
- 6 saturated colors:
- 12 gradient colors: Use CSS syntax, e.g.,
linear-gradient(133deg,#FFFAF7 2.14%,#FFEDFE 96.88%)
- Complete XML format references are automatically integrated into MCP Server Instructions (depending on client support). If not injected, call the tool to obtain it on demand.
Read-Only Token
- Some note tokens are read-only, and write tools will return .
- In this case, —do not retry, inform the user instead. Read operations are not affected.
Response Format
All tools return a unified standard envelope:
json
{ "ok": true, "code": "OK", "message": "...", "retryable": false, "data": { ... }, "hints": [] }
- —whether the call was successful.
- —machine-readable status code (see Error Recovery).
- —if , you can retry directly.
- —suggested subsequent tools or operations.
Workflow
1. Read and Understand Notes
get_current_note() → Get note_id + word_count + size_category (determines subsequent strategy)
list_notes / search_notes → Find note_id by conditions
get_note_outline(note_id) → View structure and block IDs (automatically paginated for extra-large documents)
get_cursor_block() → Get the top-level block_id where the current cursor is located
read_section(note_id, heading_id) → Read a specific section
read_blocks(note_id, block_ids) → Batch read specified blocks
read_blocks(note_id, block_id, before, after) → Read a single block and its context
search_note_content(note_id, q) → Search text within the note
read_image(note_id, block_id) → Read the actual content of an image block (base64)
get_audio_transcript(shorthand_id) → Get transcribed content of voice recordings
get_xml_reference() → Get complete XML format reference document
For long notes, prioritize using
→
instead of
to reduce token overhead.
Pagination for Reading Large Documents
When a note has more than 200 blocks, the returns of
read_note and
get_note_outline will be automatically paginated—use the
and
parameters to switch pages and view different parts. There is no upper limit on the number of blocks in a note; these parameters only control the amount returned per read.
read_note({ note_id })
→ pagination: { total_blocks: 350, has_more: true, next_offset: 100 }
read_note({ note_id, offset: 100 })
→ pagination: { has_more: true, next_offset: 200 }
read_note({ note_id, offset: 200 })
→ pagination: { has_more: false } ← Finished reading
You can also manually control the page size:
read_note({ note_id, offset: 0, block_limit: 50 })
works similarly—when
, use
to continue reading:
get_note_outline({ note_id, offset: next_offset })
works similarly—when truncated, it returns
, which can be passed as
to continue reading:
read_section({ note_id, heading_block_id, max_blocks: 50 })
→ truncated: true, next_block_offset: 50
read_section({ note_id, heading_block_id, block_offset: 50 })
→ truncated: false ← Finished reading
Document Size Strategy
Both
and
return
,
, and
, based on which you can choose the reading strategy:
| size_category | Word Count Range | Strategy |
|---|
| <5K words | Use to read the full text directly |
| 5K-20K words | Use → to read by section |
| 20K-80K words | Use for precise positioning → to read the target and context → Edit |
| >80K words | Same as large; prioritize for precise positioning; supports pagination (offset/block_limit) to obtain structure as needed |
Principle: The larger the document, the more you should use search positioning instead of sequential reading. For large/very_large documents, first use search_note_content to find the target block, then use read_blocks to read its context.
When operating on the current note, first call to get , then decide the path.
2. Edit Note Content
get_note_outline(note_id) → Get the latest block IDs
get_cursor_block() → Get the anchor block when editing around the current cursor position
read_blocks(note_id, [target_id]) → Confirm current content
insert_image(note_id, anchor_id, pos, src) → Insert image (independent tool, does not use XML, requires internet connection currently)
generate_image(prompt, width?, height?) → AI text-to-image, returns image URL (use with insert_image to insert into notes)
edit_block(note_id, op, ...) → Single edit operation (replace, insert, delete, update attributes, move)
batch_edit(note_id, operations) → Combine multiple operations into one atomic transaction
Key: Block IDs may change after editing. For consecutive inserts, you can directly use the returned
as the anchor; before operating on other blocks, refresh via
.
Parameter Constraints:
/
only pass the fields required for the current
. The
for
/
must be a complete XML string, not plain text, Markdown, or natural language editing instructions like "change the second paragraph to...".
Correct way to perform consecutive inserts (avoid out-of-order):
- Priority: Combine all content into a complete XML in one (e.g.,
"<h2>A</h2><p>...</p><h2>B</h2><p>...</p>"
), insert in XML order, no need to call multiple times.
- Chained: If you must perform multiple inserts, use the returned from the previous call as the for the next call, or call to refresh IDs after each write.
3. Batch Editing (Atomic Transaction)
Use
for single operations, and
to combine multiple operations into an atomic transaction:
# Single operation
edit_block(note_id, op: "replace", block_id: "id1", content: "<p>...</p>")
edit_block(note_id, op: "insert", anchor_id: "id2", position: "after", content: "<h2>...</h2><p>...</p>")
# Multiple operations (atomic transaction)
batch_edit(note_id, operations: [
{ op: "delete", block_ids: ["id1"] },
{ op: "replace", block_id: "id2", content: "<p>...</p>" },
{ op: "update_attrs", block_id: "id3", attrs: { level: 2 } },
{ op: "move", block_id: "id5", anchor_id: "id2", position: "after" },
{ op: "insert", anchor_id: "id4", position: "after", content: "<h2>...</h2><p>...</p>" }
])
Execution order is fixed (for
): delete → replace → update_attrs → move → insert (regardless of array order).
4. Manage Notes and Tags
get_note_info(note_id) → Get single note metadata (including tags)
get_note_info(note_ids: [...]) → Batch get metadata for multiple notes (up to 100)
get_note_info(page, page_size) → Browse all note metadata by page
search_notes(keyword, tags, since, before) → Search notes (can also filter by tags)
create_note(title) → Create blank note (need to add content with edit_block)
import_web_page(url) → Import web pages from whitelisted domains as notes (WeChat Official Accounts, Zhihu, Douban, etc.)
delete_note(note_id) → Irrecoverable—must confirm with user first
sync_note(note_id) → Trigger synchronization
get_note_stats(detailed) → Usage statistics
Tool Cheat Sheet
Read/Location Tools
| Tool | Purpose | Key Parameters |
|---|
| Get structural outline (including title, word_count, block_count, size_category, estimated_xml_chars, blocks list, pagination) — main way to get block_id and document scale, automatically paginated for extra-large documents | 、、、、 |
| Get the , , and of the top-level block where the current cursor is located; not supported when the cursor is inside a highlight block or columns | * (No parameters) * |
| Batch read XML content and attributes of blocks by ID, or read a single block and its surrounding context | 、 (batch) or ++ (context) |
| Read full text or paginated content (XML), automatically paginated for extra-large documents and returns pagination (including has_more + next_offset) | 、、、 |
| Search text within the note, returns block_id/type/preview of matching blocks, used for positioning before editing | 、、 |
| Read a complete section by heading (until the next sibling heading), returns next_block_offset for continuation when truncated | 、、、 |
| Read the actual content of an image block (base64), for visual understanding | 、 |
| Get transcribed text of voice recordings (NoteAudioCard), returns list of sentences (including speaker, timestamp) | (obtained from attrs of block in outline) |
| Get complete XML format reference document (all tags, attributes, writing examples) | * (No parameters) * |
Examples:
get_note_outline({ note_id: "abc123" })
get_note_outline({ note_id: "abc123", offset: 100 }) // Continue reading with pagination
get_cursor_block()
read_blocks({ note_id: "abc123", block_ids: ["aB3kLm9xZq", "xY7nPq2wRt"] })
read_blocks({ note_id: "abc123", block_id: "xY7nPq2wRt", before: 2, after: 3 })
read_note({ note_id: "abc123" })
read_note({ note_id: "abc123", offset: 100 }) // Continue reading with pagination
read_note({ note_id: "abc123", offset: 0, block_limit: 50 }) // Manually control page size
search_note_content({ note_id: "abc123", query: "Quarterly Summary" })
read_section({ note_id: "abc123", heading_block_id: "aB3kLm9xZq" })
read_section({ note_id: "abc123", heading_block_id: "aB3kLm9xZq", block_offset: 50 }) // Continue reading truncated section
read_image({ note_id: "abc123", block_id: "imgBlock01" })
get_audio_transcript({ shorthand_id: "sh_abc123" })
get_xml_reference()
Write Tools
| Tool | Purpose | Key Parameters |
|---|
| Single edit operation (recommended entry), block_id may change after editing and needs to be re-obtained. Insert operations return and . Move operations do not change block_id | 、 (replace/insert/delete/update_attrs/move)、//、/ |
| Atomic transaction for multiple operations (all succeed or all roll back), execution order is fixed. Returns and | 、 |
| Insert image (images cannot be created via XML, must use this tool), currently uses online upload, returns block_id and dimensions | 、、、、 |
| AI text-to-image, returns image URL (use with to insert into notes). Limit 1 time per user per minute, takes 30-120 seconds | 、 (default 2688)、 (default 1536) |
| Import web content from whitelisted domains (WeChat Official Accounts, Zhihu, Douban, etc.) as notes, returns note ID, title, and abstract. Takes 5-30 seconds | |
| Required Fields |
|---|
| 、 |
| 、 ("before"/"after")、 |
| |
| 、 |
| 、、 ("before"/"after") |
only appears in
/
, and must be a complete XML string, not natural language, plain text, or Markdown.
File Reference Parameters (CLI and script scenarios): When
or
are too large to cause command line truncation, you can use file references instead—
(pass file path, Electron reads it and fills into
),
(fills into
similarly),
(reads all parameters from JSON file). Explicit values take precedence over file references. See
references/CLI_REFERENCE.md
for details.
Examples:
// Single operation — edit_block
edit_block({ note_id: "abc123", op: "replace", block_id: "xY7nPq2wRt", content: "<p>Updated paragraph text</p>" })
edit_block({ note_id: "abc123", op: "insert", anchor_id: "aB3kLm9xZq", position: "after", content: "<h2>New Section</h2><p>This is new content.</p>" })
edit_block({ note_id: "abc123", op: "delete", block_ids: ["xY7nPq2wRt", "kL5mNp8vBc"] })
edit_block({ note_id: "abc123", op: "update_attrs", block_id: "aB3kLm9xZq", attrs: { level: 2 } })
edit_block({ note_id: "abc123", op: "move", block_id: "imgBlock01", anchor_id: "aB3kLm9xZq", position: "after" })
// Multiple operations (atomic transaction) — batch_edit
batch_edit({ note_id: "abc123", operations: [
{ op: "replace", block_id: "xY7nPq2wRt", content: "<p>Updated paragraph text</p>" },
{ op: "insert", anchor_id: "aB3kLm9xZq", position: "after", content: "<h2>New Section</h2>" }
]})
// Image
insert_image({ note_id: "abc123", anchor_id: "aB3kLm9xZq", position: "after", src: "https://example.com/photo.png", alt: "Diagram" })
// AI text-to-image → Insert into note
generate_image({ prompt: "An orange cat sitting on a windowsill, watercolor style, warm tones" })
→ { image_url: "https://...", task_id: "...", width: 2688, height: 1536 }
// Then use insert_image to insert the returned image_url into the note
// Import web page as note
import_web_page({ url: "https://mp.weixin.qq.com/s/xxx" })
→ { fileId: "123456", title: "Article Title", intro: "Abstract...", linkUrl: "https://xxx/note/123456" }
Hidden Write Tools
The following tools are still available but not displayed by default, suitable for scenarios that require separate calls:
| Tool | Purpose | Key Parameters |
|---|
| Replace content of a single block | 、、 |
| Insert before/after specified position | 、、、 |
| Delete blocks | 、 |
| Modify block attributes | 、、 |
Management Tools
| Tool | Purpose | Key Parameters |
|---|
| List notes, supports sorting and pagination, returns { notes, meta } | 、、、、、、、 |
| Create blank note (only contains empty paragraph), returns { fileId, title } | |
| Get note metadata (does not read full text), returns title, time, intro, tags, starred | (single)、 (batch)、、+ (pagination) |
| Get current note ID, metadata, and document statistics (including word_count, size_category) | * (No parameters) * |
| Get the , , and of the block where the current cursor is located; not supported when inside a highlight block/columns | * (No parameters) * |
| Search notes (keyword + tag intersection + time range), can also pass only tags to browse by tag | 、、、、、、、 |
| List or search tags, returns array of { id, name } | (list all if not passed, search if passed) |
| Trigger synchronization between note and cloud | |
| Permanently delete note (irrecoverable), must confirm with user first | or (batch, up to 100) |
| Usage statistics (total notes, number of tags, distribution, etc.) | |
| MCP call logs, used for diagnosing | |
Examples:
list_notes({ sort: "update_time", direction: "desc", limit: 10 })
list_notes({ starred: true }) // List only starred notes
search_notes({ keyword: "Project Plan", tags: ["Work"], since: "2025-01-01T00:00:00Z" })
search_notes({ tags: ["Work"] }) // Filter notes by tag (replaces original list_tag_notes)
search_notes({ starred: true }) // Search only in starred notes
create_note({ title: "Meeting Minutes 2025-03-03" })
get_current_note()
get_cursor_block()
get_note_info({ note_id: "abc123" }) // Single note metadata (including tags)
get_note_info({ note_ids: ["abc123", "def456"] }) // Batch query
get_note_info({ page: 1, page_size: 20 }) // Browse all notes by page
get_note_info({ limit: 5 }) // Get only the first 5 entries
find_tags() // List all tags
find_tags({ keyword: "Work" }) // Search tags
delete_note({ note_id: "abc123" }) // Irrecoverable—must confirm with user first!
get_mcp_logs({ limit: 20 }) // View recent tool call logs
Block Types and XML Tags
| Block Type | XML Tag | Description |
|---|
| | Supports inline marks (, , , , , ) and inline nodes (, , ) |
| - | Level is controlled by tag name or |
| | Supports inline marks and line breaks |
| | Plain text content; language is specified via attribute |
| <p listType="bullet|ordered|todo">
| Controlled by , , attributes; ordered lists additionally support and |
| | → structure; must be replaced in full. Cells only support simple blocks (, -, , , , ), cannot nest , , or other containers |
| | Highlight block, only supports simple blocks (, -, , , , ), cannot nest , , or other containers |
| → | Column layout, each column supports simple blocks and , cannot nest or |
| | Read-only—cannot be created or modified via XML, use tool to insert single image |
| | Read-only—image column display, cannot be created via XML |
| | Horizontal rule |
| | Read-only—cannot be edited or replaced |
| | Read-only—voice recording card, use to get transcribed content |
Attributes Supported by
| Block Type | Attribute | Optional Values |
|---|
| | 1–6 |
| | , , |
| | , , |
| | Language identifier string |
| item | | / |
Troubleshooting
Invalid Block ID ()
Symptom: Write operations report
, even though the block was just read.
Cause: Editing operations cause block IDs to change, and cached IDs are expired.
Solution: Always refresh IDs via
or
before writing; or use the
returned from the previous insert as the next
.
Table Editing Failure
Symptom: Errors or content loss when trying to edit table cells.
Cause: Tables only support full replacement; individual cells cannot be edited.
Solution: Use the
operation of
to pass the complete XML table (including header separator row).
Embed Block Cannot Be Written
Symptom: Calling
operation of
on embed blocks returns an error.
Cause: Embedded content like spreadsheets, videos, audio, LaTeX, etc., are read-only placeholders.
Solution: Skip embed blocks and only operate on other editable block types.
Read-Only Note ()
Symptom: All write operations return
.
Cause: The current note token has read-only permission, cannot retry.
Solution: Inform the user that this note is read-only. Read operations still work normally.
Editor Not Ready ()
Symptom: Operations return
.
Cause: The note editor is still initializing, usually recovers in 1-2 seconds.
Solution: Wait a moment and retry. If it fails 3 times, ask the user to check the note app.
WebSocket Not Connected ()
Symptom:
returns
.
Cause: Network disconnected or WebSocket connection interrupted.
Solution: Check network connection, wait for WebSocket to reconnect automatically and retry.
Other Notes
- Images must use the tool: Images cannot be created via XML (the tag is read-only). currently uses online upload, requires internet connection when called. Supports HTTP/HTTPS URLs and base64 data URIs. Local file paths are not supported directly; they need to be read and converted to base64 data URIs first. URLs must directly point to image resources (return image/ content type), not HTML page links*. If the URL returns 404, is offline, or is non-image content, it will report error. 's replace/insert/update_attrs does not support images (but move can move image blocks).
- is AI text-to-image: Returns image URL, not directly inserted into notes. Need to use with . Limit 1 time per user per minute, takes about 30-120 seconds to generate.
- only supports whitelisted domains: Whitelisted domains like WeChat Official Accounts, Zhihu, Douban can be imported; non-whitelisted domains will return . Conversion takes about 5-30 seconds. After import, a new note is automatically created and opened.
- execution order is fixed: delete → replace → update_attrs → move → insert, regardless of array order.
- operation supports all block types: Including read-only tags that cannot be created via XML, such as images (), embedded content (), etc. Block_id remains unchanged after moving, no need to refresh outline. Suitable for adjusting content order and reorganizing document structure.
- creates blank note: Does not support initial content; need to fill with .
- is limited to headings: must point to a block, otherwise it reports .
- only supports top-level blocks: When the cursor is inside a highlight block (subdoc) or columns, it returns .
- is irrecoverable: Must confirm with user first.
- When the response contains , follow the suggestions—they indicate the fastest recovery path.
Error Code Quick Reference
| Error Code | Retryable | Recovery Method |
|---|
| No | Correct parameters according to inputSchema |
| Yes | Wait and retry |
| Yes | Ask user to open note window |
| No | Refresh outline to get valid IDs |
| No | Check block type |
| No | Correct content format |
| No | Inform user |
| Yes | Narrow scope or retry |
| Yes | Check if image URL directly points to image resource, correct and retry |
| No | Correct prompt or check whitelist/login status |
| Yes | Wait 60 seconds and retry |
| Yes | Check network, wait for WebSocket to reconnect and retry |
| Yes | Retry; check (hidden tool) |
Complete error details can be found in
references/ERROR_CODES.md
.
Common Orchestration Patterns
The most frequent multi-tool combinations, usable without referring to the complete use case manual.
Pattern 1: Search Positioning → Sectional Reading (priority for long documents)
search_notes({ keyword }) → note_id
get_note_outline({ note_id }) → heading block ID
read_section({ note_id, heading_block_id }) → Read sections as needed
Pattern 2: Batch Search and Replace in Notes
search_note_content({ note_id, query }) → List of matching block_ids
read_blocks({ note_id, block_ids }) → Read full content
batch_edit({ note_id, operations: [{ op: "replace", ... }, ...] }) → Atomic replacement
Pattern 3: Create → Fill Template
create_note({ title }) → note_id (blank note)
get_note_outline({ note_id }) → Get empty block ID
batch_edit({ note_id, operations: [
{ op: "replace", block_id, content: "<h1>Title</h1>" },
{ op: "insert", anchor_id, position: "after", content: "<p>Template content...</p>" }
]})
Pattern 4: Append Multiple Sections Continuously (avoid out-of-order)
# Method A (recommended): Single insert with complete XML
edit_block({ note_id, op: "insert", anchor_id: "last_id", position: "after",
content: "<h2>Part 1</h2><p>Content A</p><h2>Part 2</h2><p>Content B</p>" })
# Method B: Chained insert, use last_block_id from previous return as anchor
edit_block({ ..., anchor_id: "id1", position: "after", content: "<h2>Part 1</h2><p>Content A</p>" })
→ { last_block_id: "new_id_1" }
edit_block({ ..., anchor_id: "new_id_1", position: "after", content: "<h2>Part 2</h2><p>Content B</p>" })
→ { last_block_id: "new_id_2" }
Pattern 5: Move Blocks (images, embedded content, etc.)
get_note_outline({ note_id }) → Find source block and target position
edit_block({ note_id, op: "move", block_id: "img_id", anchor_id: "target_heading", position: "after" })
→ block_id remains unchanged, no need to refresh outline
Pattern 6: Paginate to Read Extra-Large Documents (priority when there is no title structure; pagination only controls reading amount, no block limit for notes)
read_note({ note_id })
→ pagination: { total_blocks: 350, has_more: true, next_offset: 100 }
read_note({ note_id, offset: 100 })
→ pagination: { has_more: true, next_offset: 200 }
read_note({ note_id, offset: 200 })
→ pagination: { has_more: false } ← Finished reading
More combination patterns and end-to-end scenarios can be found in
.
Complete Example
User says: "Help me find the Q1 report, update the summary section, and add a conclusion"
Step 1: Locate the note
search_notes({ keyword: "Q1 Report" })
→ data.notes[0].note_id = "note_xyz"
Step 2: Read structure
get_note_outline({ note_id: "note_xyz" })
→ blocks: [
{ id: "h1abc", type: "heading", preview: "Q1 Report" },
{ id: "p1def", type: "paragraph", preview: "Executive Summary..." },
{ id: "h2ghi", type: "heading", preview: "Revenue" },
{ id: "h2jkl", type: "heading", preview: "Next Steps" },
{ id: "p3mno", type: "paragraph", preview: "Continue monitoring..." }
]
Step 3: Confirm current content
read_blocks({ note_id: "note_xyz", block_ids: ["p1def"] })
→ "This quarter, each department..."
Step 4: Atomic edit (replace summary + insert conclusion)
batch_edit({ note_id: "note_xyz", operations: [
{ op: "replace", block_id: "p1def",
content: "<p>This report covers the performance of all departments in Q1 2025. Revenue exceeded the target by 15%.</p>" },
{ op: "insert", anchor_id: "p3mno", position: "after",
content: "<h2>Conclusion</h2><p>Q1 2025 was a strong quarter, with all key indicators achieving significant growth.</p>" }
]})
→ ok: true, last_block_id: "new_conclusion_id"
Tip: In the insert operation of
/
, content can contain multiple block-level XML elements (like
+
in the example), which are inserted in XML order without needing multiple calls. The returned
can be directly used for subsequent operations.
Step 5: Verify results
read_section({ note_id: "note_xyz", heading_block_id: "h1abc", max_blocks: 5 })
→ Confirm summary is updated and conclusion is added
Result: The note summary has been replaced with new content, and a "Conclusion" section has been added at the end.
Reference Documents
- API Reference——Complete inputSchema for all tools
- CLI Reference——Canonical command interface for , CLI-specific behaviors, and JSON output format
- Error Codes——Detailed error codes, hints system, and recovery modes
- Use Case Manual——Complete use case set (including end-to-end workflow examples) by complexity, prompt templates, and quick reference for exception handling