Loading...
Loading...
Compare original and translation side by side
block_idblock_idBLOCK_NOT_FOUNDEDITOR_NOT_READYBLOCK_NOT_FOUNDEDITOR_NOT_READYblock_idparagraphheadingblockquotecode_blocklisttableimagehorizontal_rulehighlight_blockcolumnsembednote_audio_cardembednote_audio_card<NoteAudioCard/>get_audio_transcript<highlightBlock><highlightBlock><columns><table><columns><column><highlightBlock><table><columns>block_idparagraphheadingblockquotecode_blocklisttableimagehorizontal_rulehighlight_blockcolumnsembednote_audio_cardembednote_audio_card<NoteAudioCard/>get_audio_transcript<highlightBlock><highlightBlock><columns><table><column><columns><highlightBlock><table><columns>note_idlist_notessearch_notesnote_idget_current_noteget_note_infonote_idnote_idspagepage_sizelimitnote_idnote_idlist_notessearch_notesget_current_noteget_note_infonote_idnote_idspagepage_sizelimit<p><h1><h6><blockquote><codeblock><table><highlightBlock><columns>id<p id="aB3kLm9xZq">内容</p>edit_blockblock_idanchor_idget_note_outlineread_note<highlightBlock><columns><table>idreplaceblock_idcontentididblock_idinsertidblock_id<strong>粗体</strong><em>斜体</em><s>删除线</s><u>下划线</u><a href="url">链接</a><tag>#标签名</tag><tag>#name</tag>#/<tag>#工作/项目</tag>find_tags<tag><tag><a><emoji value="😀"/><latex formula="E=mc^2"/><br/><span><span fontColor="#C21C13">红色文字</span><span fontHighlightColor="#FBF5B3">高亮文字</span><span fontSize="16">大号文字</span>fontColor#080F17#C21C13#DB7800#078654#0E52D4#0080A0#757575#DA326B#D1A300#58A401#116AF0#A639D7fontHighlightColor#FBF5B3#F8D7B7#F7C7D3#DFF0C4#C6EADD#D9EEFB#D5DCF7#E6D6F0#E6E6E6highlightBlock#FAF1E6#FEC794#FAE6E6#F2A7A7#E6FAEB#AFE3BB#E6EEFA#98C1FF#F5EBFA#E5B5FD#EBEBEB#C5C5C5columnBackgroundColor#FFF5EB#FFECEB#E8FCEF#EBF2FF#FAF0FF#F2F2F2#FCFAE1#FEF6E7#FFF5ED#FFF2F0#FFF2F4#FFF0F7#EEFFEB#EBFFF5#E8FCFC#EBF8FF#EBF1FF#F0EDFF#F2E7E4#F0E6DA#F5EEDA#EDF0EB#EDEEF0#F0E4DD#FEF49C#BCFAAF#ADF4FF#C2D3FF#FFC7C7#E0E0E0linear-gradient()linear-gradient(133deg,#FFFAF7 2.14%,#FFEDFE 96.88%)get_xml_reference<p><h1><h6><blockquote><codeblock><table><highlightBlock><columns>id<p id="aB3kLm9xZq">Content</p>block_idanchor_idedit_blockget_note_outlineid<highlightBlock><columns><table>read_notereplaceblock_ididcontentidblock_idinsertidblock_id<strong>bold</strong><em>italic</em><s>strikethrough</s><u>underline</u><a href="url">link</a><tag>#tagname</tag><tag>#name</tag>#/<tag>#work/project</tag>find_tags<tag><tag><a><emoji value="😀"/><latex formula="E=mc^2"/><br/><span><span fontColor="#C21C13">red text</span><span fontHighlightColor="#FBF5B3">highlighted text</span><span fontSize="16">large text</span>fontColor#080F17#C21C13#DB7800#078654#0E52D4#0080A0#757575#DA326B#D1A300#58A401#116AF0#A639D7fontHighlightColor#FBF5B3#F8D7B7#F7C7D3#DFF0C4#C6EADD#D9EEFB#D5DCF7#E6D6F0#E6E6E6highlightBlock#FAF1E6#FEC794#FAE6E6#F2A7A7#E6FAEB#AFE3BB#E6EEFA#98C1FF#F5EBFA#E5B5FD#EBEBEB#C5C5C5columnBackgroundColor#FFF5EB#FFECEB#E8FCEF#EBF2FF#FAF0FF#F2F2F2#FCFAE1#FEF6E7#FFF5ED#FFF2F0#FFF2F4#FFF0F7#EEFFEB#EBFFF5#E8FCFC#EBF8FF#EBF1FF#F0EDFF#F2E7E4#F0E6DA#F5EEDA#EDF0EB#EDEEF0#F0E4DD#FEF49C#BCFAAF#ADF4FF#C2D3FF#FFC7C7#E0E0E0linear-gradient()linear-gradient(133deg,#FFFAF7 2.14%,#FFEDFE 96.88%)get_xml_referenceDOCUMENT_READ_ONLYretryable: falseDOCUMENT_READ_ONLYretryable: false{ "ok": true, "code": "OK", "message": "...", "retryable": false, "data": { ... }, "hints": [] }okcoderetryabletruehints{ "ok": true, "code": "OK", "message": "...", "retryable": false, "data": { ... }, "hints": [] }okcoderetryabletruehintsget_current_note() → 获取 note_id + word_count + size_category(决定后续策略)
list_notes / search_notes → 按条件查找 note_id
get_note_outline(note_id) → 查看结构和 block ID(超大文档自动分页)
get_cursor_block() → 获取当前光标所在顶层 block_id
read_section(note_id, heading_id) → 读取某个章节
read_blocks(note_id, block_ids) → 批量读取指定 block
read_blocks(note_id, block_id, before, after) → 读取单个 block 及上下文
search_note_content(note_id, q) → 在笔记内搜索文本
read_image(note_id, block_id) → 读取图片 block 的实际内容(base64)
get_audio_transcript(shorthand_id) → 获取语音录音的转写内容
get_xml_reference() → 获取 XML 格式完整参考文档get_note_outlineread_sectionread_noteget_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 documentget_note_outlineread_sectionread_noteoffsetblock_limitread_noteread_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 } ← 读完read_note({ note_id, offset: 0, block_limit: 50 })get_note_outlinehas_more: truenext_offsetget_note_outline({ note_id, offset: next_offset })read_sectionnext_block_offsetblock_offsetread_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 ← 读完offsetblock_limitread_noteread_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 readingread_note({ note_id, offset: 0, block_limit: 50 })get_note_outlinehas_more: truenext_offsetget_note_outline({ note_id, offset: next_offset })read_sectionnext_block_offsetblock_offsetread_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 readingget_current_noteget_note_outlineword_countsize_categoryestimated_xml_chars| size_category | 字数范围 | 策略 |
|---|---|---|
| <5K 字 | |
| 5K-20K 字 | |
| 20K-80K 字 | |
| >80K 字 | 同 large,精准定位优先 |
get_current_notesize_categoryget_current_noteget_note_outlineword_countsize_categoryestimated_xml_chars| size_category | Word Count Range | Strategy |
|---|---|---|
| <5K words | Use |
| 5K-20K words | Use |
| 20K-80K words | Use |
| >80K words | Same as large; prioritize |
get_current_notesize_categoryget_note_outline(note_id) → 获取最新 block ID
get_cursor_block() → 当前围绕光标位置编辑时,获取锚点 block
read_blocks(note_id, [target_id]) → 确认当前内容
insert_image(note_id, anchor_id, pos, src) → 插入图片(独立工具,不走 XML,当前需联网)
generate_image(prompt, width?, height?) → AI 文生图,返回图片 URL(配合 insert_image 插入笔记)
edit_block(note_id, op, ...) → 单个编辑操作(替换、插入、删除、更新属性、移动)
batch_edit(note_id, operations) → 多个操作合并为一次原子事务last_block_idget_note_outlineedit_blockbatch_editopreplaceinsertcontent"把第二段改成……"insert"<h2>A</h2><p>...</p><h2>B</h2><p>...</p>"insertlast_block_idanchor_idget_note_outlineget_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 transactionlast_block_idget_note_outlineedit_blockbatch_editopcontentreplaceinsertinsert"<h2>A</h2><p>...</p><h2>B</h2><p>...</p>"last_block_idanchor_idget_note_outlineedit_blockbatch_editundefinededit_blockbatch_editundefined
**执行顺序固定**(`batch_edit`):delete → replace → update_attrs → move → insert(与数组顺序无关)。
**Execution order is fixed** (for `batch_edit`): delete → replace → update_attrs → move → insert (regardless of array order).get_note_info(note_id) → 获取单个笔记元数据(含标签)
get_note_info(note_ids: [...]) → 批量获取多个笔记元数据(最多 100 个)
get_note_info(page, page_size) → 分页浏览所有笔记元数据
search_notes(keyword, tags, since, before) → 搜索笔记(也可按标签筛选笔记)
create_note(title) → 创建空白笔记(需用 edit_block 添加内容)
import_web_page(url) → 从白名单域名导入网页为笔记(微信公众号、知乎、豆瓣等)
delete_note(note_id) → 不可恢复——必须与用户确认
sync_note(note_id) → 触发同步
find_tags() → 列出所有标签
find_tags(keyword) → 搜索标签
get_note_stats(detailed) → 使用统计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| 工具 | 用途 | 关键参数 |
|---|---|---|
| 获取结构大纲(含 title、word_count、block_count、size_category、estimated_xml_chars、blocks 列表、pagination)——获取 block_id 和文档规模的主要方式,超大文档自动分页 | |
| 获取当前光标所在顶层 block 的 | (无参数) |
| 按 ID 批量读取 block 的 XML 内容和属性,或读取单个 block 及前后上下文 | |
| 读取全文或分页读取(XML),超大文档自动分页并返回 pagination(含 has_more + next_offset) | |
| 在笔记内搜索文本,返回匹配 block 的 block_id/type/preview,用于编辑前定位 | |
| 按标题读取完整章节(到下一同级标题),截断时返回 next_block_offset 用于续读 | |
| 读取图片 block 的实际内容(base64),可供视觉理解 | |
| 获取语音录音(NoteAudioCard)的转写文本,返回句子列表(含说话人、时间戳) | |
| 获取 XML 格式完整参考文档(所有标签、属性、写入示例) | (无参数) |
get_note_outline({ note_id: "abc123" })
get_note_outline({ note_id: "abc123", offset: 100 }) // 分页续读
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 }) // 分页续读
read_note({ note_id: "abc123", offset: 0, block_limit: 50 }) // 手动控制每页大小
search_note_content({ note_id: "abc123", query: "季度总结" })
read_section({ note_id: "abc123", heading_block_id: "aB3kLm9xZq" })
read_section({ note_id: "abc123", heading_block_id: "aB3kLm9xZq", block_offset: 50 }) // 续读截断章节
read_image({ note_id: "abc123", block_id: "imgBlock01" })
get_audio_transcript({ shorthand_id: "sh_abc123" })
get_xml_reference()| 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 | * (No parameters) * |
| Batch read XML content and attributes of blocks by ID, or read a single block and its surrounding 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) | |
| Get complete XML format reference document (all tags, attributes, writing examples) | * (No parameters) * |
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()| 工具 | 用途 | 关键参数 |
|---|---|---|
| 单个编辑操作(推荐入口),编辑后 block_id 可能变化需重新获取。insert 操作返回 | |
| 多个操作的原子事务(全部成功或全部回滚),执行顺序固定。返回 | |
| 插入图片(图片不可通过 XML 创建,必须用此工具),当前走在线上传,返回 block_id 和尺寸 | |
| AI 文生图,返回图片 URL(配合 | |
| 从白名单域名(微信公众号、知乎、豆瓣等)导入网页内容为笔记,返回笔记 ID、标题和摘要。耗时 5-30 秒 | |
edit_blockbatch_edit | 必填字段 |
|---|---|
| |
| |
| |
| |
| |
contentreplaceinsertcontentoperationscontent_filecontentoperations_fileoperations__args_filereferences/CLI_REFERENCE.md// 单个操作 — edit_block
edit_block({ note_id: "abc123", op: "replace", block_id: "xY7nPq2wRt", content: "<p>更新后的段落文本</p>" })
edit_block({ note_id: "abc123", op: "insert", anchor_id: "aB3kLm9xZq", position: "after", content: "<h2>新章节</h2><p>这里是新内容。</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" })
// 多个操作(原子事务) — batch_edit
batch_edit({ note_id: "abc123", operations: [
{ op: "replace", block_id: "xY7nPq2wRt", content: "<p>更新后的段落文本</p>" },
{ op: "insert", anchor_id: "aB3kLm9xZq", position: "after", content: "<h2>新章节</h2>" }
]})
// 图片
insert_image({ note_id: "abc123", anchor_id: "aB3kLm9xZq", position: "after", src: "https://example.com/photo.png", alt: "示意图" })
// AI 文生图 → 插入笔记
generate_image({ prompt: "一只橘猫坐在窗台上,水彩画风格,暖色调" })
→ { image_url: "https://...", task_id: "...", width: 2688, height: 1536 }
// 然后用 insert_image 将返回的 image_url 插入笔记
// 导入网页为笔记
import_web_page({ url: "https://mp.weixin.qq.com/s/xxx" })
→ { fileId: "123456", title: "文章标题", intro: "摘要...", linkUrl: "https://xxx/note/123456" }| Tool | Purpose | Key Parameters |
|---|---|---|
| Single edit operation (recommended entry), block_id may change after editing and needs to be re-obtained. Insert operations return | |
| Atomic transaction for multiple operations (all succeed or all roll back), execution order is fixed. Returns | |
| 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 | |
| Import web content from whitelisted domains (WeChat Official Accounts, Zhihu, Douban, etc.) as notes, returns note ID, title, and abstract. Takes 5-30 seconds | |
edit_blockbatch_edit | Required Fields |
|---|---|
| |
| |
| |
| |
| |
contentreplaceinsertcontentoperationscontent_filecontentoperations_fileoperations__args_filereferences/CLI_REFERENCE.md// 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" }| 工具 | 用途 | 关键参数 |
|---|---|---|
| 替换单个 block 内容 | |
| 在指定位置前后插入 | |
| 删除 block | |
| 修改 block 属性 | |
| Tool | Purpose | Key Parameters |
|---|---|---|
| Replace content of a single block | |
| Insert before/after specified position | |
| Delete blocks | |
| Modify block attributes | |
| 工具 | 用途 | 关键参数 |
|---|---|---|
| 列出笔记,支持排序和分页,返回 { notes, meta } | |
| 创建空白笔记(仅含空段落),返回 { fileId, title } | |
| 获取笔记元数据(不读全文),返回 title、时间、intro、tags、starred | |
| 获取当前笔记 ID、元数据和文档统计(含 word_count、size_category) | (无参数) |
| 获取当前光标所在 block 的 | (无参数) |
| 搜索笔记(关键词 + 标签交集 + 时间范围),也可仅传 tags 按标签浏览 | |
| 列出或搜索标签,返回 { id, name } 数组 | |
| 触发笔记与云端同步 | |
| 永久删除笔记(不可恢复),须先与用户确认 | |
| 使用统计(总笔记数、标签数、分布等) | |
| MCP 调用日志,用于诊断 | |
list_notes({ sort: "update_time", direction: "desc", limit: 10 })
list_notes({ starred: true }) // 仅列出已收藏笔记
search_notes({ keyword: "项目方案", tags: ["工作"], since: "2025-01-01T00:00:00Z" })
search_notes({ tags: ["工作"] }) // 按标签筛选笔记(替代原 list_tag_notes)
search_notes({ starred: true }) // 仅在已收藏笔记中搜索
create_note({ title: "会议记录 2025-03-03" })
get_current_note()
get_cursor_block()
get_note_info({ note_id: "abc123" }) // 单个笔记元数据(含标签)
get_note_info({ note_ids: ["abc123", "def456"] }) // 批量查询
get_note_info({ page: 1, page_size: 20 }) // 分页浏览所有笔记
get_note_info({ limit: 5 }) // 仅获取前 5 条
find_tags() // 列出所有标签
find_tags({ keyword: "工作" }) // 搜索标签
delete_note({ note_id: "abc123" }) // 不可恢复——必须先与用户确认!
get_mcp_logs({ limit: 20 }) // 查看最近的工具调用日志| 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 | |
| Get current note ID, metadata, and document statistics (including word_count, size_category) | * (No parameters) * |
| Get the | * (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 } | |
| Trigger synchronization between note and cloud | |
| Permanently delete note (irrecoverable), must confirm with user first | |
| Usage statistics (total notes, number of tags, distribution, etc.) | |
| MCP call logs, used for diagnosing | |
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 类型 | XML 标签 | 说明 |
|---|---|---|
| | 支持行内 mark( |
| | 级别由标签名或 |
| | 支持行内 mark 和 |
| | 纯文本内容;语言通过 |
| | 通过 |
| | |
| | 高亮块,仅支持简单块( |
| | 分栏布局,每个 column 支持简单块和 |
| | 只读——不可通过 XML 创建或修改,使用 |
| | 只读——图片分栏展示,不可通过 XML 创建 |
| | 分隔线 |
| | 只读——不可编辑或替换 |
| | 只读——语音录音卡片,使用 |
| Block Type | XML Tag | Description |
|---|---|---|
| | Supports inline marks ( |
| | Level is controlled by tag name or |
| | Supports inline marks and |
| | Plain text content; language is specified via |
| | Controlled by |
| | |
| | Highlight block, only supports simple blocks ( |
| | Column layout, each column supports simple blocks and |
| | Read-only—cannot be created or modified via XML, use |
| | 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 |
update_block_attrsupdate_block_attrs| Block 类型 | 属性 | 可选值 |
|---|---|---|
| | 1–6 |
| | |
| | |
| | 语言标识字符串 |
| | |
| Block Type | Attribute | Optional Values |
|---|---|---|
| | 1–6 |
| | |
| | |
| | Language identifier string |
| | |
BLOCK_NOT_FOUNDBLOCK_NOT_FOUNDBLOCK_NOT_FOUNDget_note_outlinesearch_note_contentlast_block_idanchor_idBLOCK_NOT_FOUNDget_note_outlinesearch_note_contentlast_block_idanchor_idedit_blockreplacereplaceedit_blockedit_blockreplacereplaceedit_blockDOCUMENT_READ_ONLYDOCUMENT_READ_ONLYDOCUMENT_READ_ONLYDOCUMENT_READ_ONLYEDITOR_NOT_READYEDITOR_NOT_READYEDITOR_NOT_READYEDITOR_NOT_READYWEBSOCKET_NOT_CONNECTEDWEBSOCKET_NOT_CONNECTEDget_audio_transcriptWEBSOCKET_NOT_CONNECTEDget_audio_transcriptWEBSOCKET_NOT_CONNECTEDinsert_image<img/>insert_imageIMAGE_FETCH_FAILEDedit_blockgenerate_imageinsert_imageimport_web_pageINVALID_PARAMSbatch_editmove<img/><embed/>create_noteedit_blockread_sectionheading_block_idheadingINVALID_BLOCK_TYPEget_cursor_blockUNSUPPORTED_POSITIONdelete_notehintsinsert_image<img/>insert_imageIMAGE_FETCH_FAILEDedit_blockgenerate_imageinsert_imageimport_web_pageINVALID_PARAMSbatch_editmove<img/><embed/>create_noteedit_blockread_sectionheading_block_idheadingINVALID_BLOCK_TYPEget_cursor_blockUNSUPPORTED_POSITIONdelete_notehints| 错误码 | 可重试 | 恢复方法 |
|---|---|---|
| 否 | 按 inputSchema 修正参数 |
| 是 | 等待后重试 |
| 是 | 请用户打开笔记窗口 |
| 否 | 刷新大纲获取有效 ID |
| 否 | 检查 block 类型 |
| 否 | 修正内容格式 |
| 否 | 告知用户 |
| 是 | 缩小范围或重试 |
| 是 | 检查图片 URL 是否直接指向图片资源,修正后重试 |
| 否 | 修正 prompt 或检查白名单/登录状态 |
| 是 | 等待 60 秒后重试 |
| 是 | 检查网络,等待 WebSocket 重连后重试 |
| 是 | 重试;查 |
references/ERROR_CODES.md| 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 |
references/ERROR_CODES.mdsearch_notes({ keyword }) → note_id
get_note_outline({ note_id }) → heading block ID
read_section({ note_id, heading_block_id }) → 按需读取章节search_note_content({ note_id, query }) → 匹配的 block_id 列表
read_blocks({ note_id, block_ids }) → 读取完整内容
batch_edit({ note_id, operations: [{ op: "replace", ... }, ...] }) → 原子替换create_note({ title }) → note_id(空白笔记)
get_note_outline({ note_id }) → 获取空 block ID
batch_edit({ note_id, operations: [
{ op: "replace", block_id, content: "<h1>标题</h1>" },
{ op: "insert", anchor_id, position: "after", content: "<p>模板内容...</p>" }
]})undefinedsearch_notes({ keyword }) → note_id
get_note_outline({ note_id }) → heading block ID
read_section({ note_id, heading_block_id }) → Read sections as neededsearch_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 replacementcreate_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>" }
]})undefined
**模式 5:移动 block(图片、嵌入内容等)**
**模式 6:分页读取超大文档**(无标题结构时优先,分页仅控制读取量,笔记无 block 上限)
更多组合模式和端到端场景参见 `references/USE_CASES.md`。
**Pattern 5: Move Blocks (images, embedded content, etc.)**
**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)
More combination patterns and end-to-end scenarios can be found in `references/USE_CASES.md`.search_notes({ keyword: "Q1 报告" })
→ data.notes[0].note_id = "note_xyz"get_note_outline({ note_id: "note_xyz" })
→ blocks: [
{ id: "h1abc", type: "heading", preview: "Q1 报告" },
{ id: "p1def", type: "paragraph", preview: "执行摘要..." },
{ id: "h2ghi", type: "heading", preview: "营收" },
{ id: "h2jkl", type: "heading", preview: "下一步计划" },
{ id: "p3mno", type: "paragraph", preview: "继续监控..." }
]read_blocks({ note_id: "note_xyz", block_ids: ["p1def"] })
→ "本季度各部门..."batch_edit({ note_id: "note_xyz", operations: [
{ op: "replace", block_id: "p1def",
content: "<p>本报告涵盖 2025 年 Q1 各部门业绩表现。营收超出目标 15%。</p>" },
{ op: "insert", anchor_id: "p3mno", position: "after",
content: "<h2>总结</h2><p>2025 年 Q1 是强劲的一个季度,所有关键指标均实现显著增长。</p>" }
]})
→ ok: true, last_block_id: "new_conclusion_id"提示:/batch_edit的 insert 操作中,content 可包含多个块级 XML 元素(如上例的edit_block+<h2>),它们按 XML 顺序插入,无需分多次调用。返回的<p>可直接用于后续操作。last_block_id
read_section({ note_id: "note_xyz", heading_block_id: "h1abc", max_blocks: 5 })
→ 确认摘要已更新、结论已添加search_notes({ keyword: "Q1 Report" })
→ data.notes[0].note_id = "note_xyz"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..." }
]read_blocks({ note_id: "note_xyz", block_ids: ["p1def"] })
→ "This quarter, each department..."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/batch_edit, content can contain multiple block-level XML elements (likeedit_block+<h2>in the example), which are inserted in XML order without needing multiple calls. The returned<p>can be directly used for subsequent operations.last_block_id
read_section({ note_id: "note_xyz", heading_block_id: "h1abc", max_blocks: 5 })
→ Confirm summary is updated and conclusion is addedwpsnote-cliwpsnote-cli