MCP server for SiYuan note-taking system providing tools to read, search, and write documents and blocks
Server defines 14 tools with explicit schemas and descriptions in Chinese. All tools are properly registered via mcp.NewTool() with parameter definitions using mcp.WithString/WithNumber. Naming follows verb_noun convention (notebook_list, document_get, block_update). However, descriptions are brief (avg ~40 chars, well below the 194-char baseline), lack context on WHEN to use each tool, and omit recovery guidance. Parameter descriptions are present but minimal. Output schemas are not documented, LLMs cannot predict response structure. No error handling guidance visible in handlers. Security: SQL injection risk in query_sql tool (accepts raw SQL statements). No input validation or sanitization visible.
向文档末尾追加新块
获取块信息,包含内容、类型、路径等
获取块的 kramdown 源码
更新块内容(支持 Markdown 和 DOM 格式)
在指定笔记本中创建今日日记
创建新的 Markdown 文档
获取文档的 Markdown 内容
Output schemas not documented. LLMs cannot predict response structure (e.g., what fields does notebook_list return? Is it an array or object?). Handlers use jsonResult() to serialize responses, but no schema is declared to the client.
query_sql accepts raw SQL statements with no input validation or sanitization. Agents can be tricked into SQL injection attacks. No parameterized query support visible.
Descriptions are too brief (avg 40 chars vs 194-char baseline). They state WHAT the tool does but not WHEN to use it or how it differs from similar tools. E.g., 'document_get' vs 'block_get' distinction is unclear.
| Scored | Grade | Overall | Spec posture | Rubric |
|---|---|---|---|---|
| 2026-09-23 | C | 63 | 2026-07-28+ | v2 |
列出指定笔记本下的文档树结构
获取文档的大纲结构(标题层级)
列出所有思源笔记笔记本,返回 ID、名称、图标和开关状态
执行 SQL 查询,用于高级数据检索
按标题搜索文档
全文搜索思源笔记中的块内容
列出所有标签
No error handling guidance in tool responses. Handlers return apiError() or mcp.NewToolResultError() with raw error messages, but do not guide LLMs on recovery (e.g., 'Try search_docs() first to find the document ID').
Write operations (document_create, block_update, block_append) lack confirmation/dry-run support. Agents can accidentally create or modify documents without a safety gate.