Skip to main content
Glama
Miles1994

siyuan-note-mcp

by Miles1994

Server Configuration

Describes the environment variables required to run the server.

NameRequiredDescriptionDefault
SIYUAN_TOKENNoAPI token. Only required when authentication is enabled on the SiYuan kernel.
SIYUAN_API_URLNoThe URL of the SiYuan kernel. Alias: SIYUAN_BASE_URL.http://127.0.0.1:6806
SIYUAN_BASE_URLNoAlternative environment variable to SIYUAN_API_URL.http://127.0.0.1:6806
SIYUAN_TIMEOUT_MSNoTimeout for each request in milliseconds.30000

Instructions

Guidance the server publishes about itself, which clients place ahead of the tool catalog so the model reads it before choosing anything.

This server publishes no instructions, or was last inspected before Glama recorded them.

Capabilities

Features and capabilities supported by this server

Protocol revision2025-11-25

CapabilityDetails
tools
{
  "listChanged": true
}

Tools

Functions exposed to the LLM to take actions

NameDescription
list_notebooksA

List every notebook (思源笔记本) in the workspace with its ID, name and open state. Call this first when you need a notebook ID for other tools.

search_notesA

Full-text search across the workspace and return matching blocks with their IDs and document paths. Use this to locate content before reading or editing it. Supports SiYuan search syntax, e.g. foo bar (AND), "exact phrase", foo OR bar, -exclude, * wildcard.

list_documentsA

List documents in the workspace or in one notebook, most recently updated first. Useful for browsing what exists before searching.

get_documentA

Read a document as Markdown. Accepts a document ID or a human-readable path such as /Notes/My doc. This is the primary way to read note content.

get_blockA

Read one block by ID. kramdown returns the source including block attributes (IDs, made useful for locating nested blocks to edit); children lists direct child blocks.

insert_blockA

Append Markdown as new blocks. With parent_id the content is appended inside that block (use a document ID to append to a document); with previous_id it is inserted directly after that block. Provide exactly one of them.

update_blockA

Replace the content of an existing block with new Markdown. The block type may change (e.g. a paragraph into a heading) unless lock_type is true. Get the ID from get_block or search_notes first.

delete_blockA

Delete a block (and its children) by ID. Deleting a document block removes the whole document. Use get_document or search_notes first to confirm the target.

create_documentA

Create a document from Markdown. path is the human-readable path, e.g. /Notes/Idea; missing parent documents are created automatically. An existing path is not overwritten — a new document is created alongside it.

rename_documentC

Change the title of a document. Accepts a document ID or a path.

remove_documentB

Delete a document. Accepts a document ID or a path. The document is moved to the workspace trash (数据历史) and can be recovered from SiYuan.

move_documentA

Move a document under a different parent document, or into a different notebook. to may be a parent document ID/path, or a notebook ID/name to move it to that notebook's root.

sql_queryA

Run a read-only SQL query against the SiYuan index to answer questions the other tools cannot, e.g. counting blocks or filtering by tag/attribute. Main table: blocks (id, parent_id, root_id, box, path, hpath, type, subtype, content, tag, ial, created, updated). Only SELECT/WITH/EXPLAIN are allowed; results are capped at 64 rows by the kernel.

Prompts

Interactive templates invoked by user choice

NameDescription

No prompts

Resources

Contextual data attached and managed by the client

NameDescription

No resources

TDQS

A3.7/5.0

Scored across 13 tools

Disambiguation4/5

Most tools target distinct resource+action pairs and descriptions explicitly distinguish reading vs editing. However, delete_block (which can delete a whole document) overlaps with remove_document, and get_document vs get_block require reading descriptions to separate. These are minor and well-clarified.

Naming Consistency5/5

Nearly every tool follows a clean verb_noun pattern (list_notebooks, get_document, insert_block, update_block, delete_block, create_document, rename_document, remove_document, move_document). The only outlier is sql_query, which is a conventional, idiomatic exception.

Tool Count5/5

13 tools is well within the ideal range and each earns its place across document, block, search, and query operations. No redundant or filler tools.

Completeness4/5

Document lifecycle (create/read/rename/move/remove) and block CRUD (get/insert/update/delete) are fully covered, plus search and SQL escape hatch. The main gap is notebook-level management — notebooks can only be listed, not created/renamed/deleted.

Maintenance

ActivityMaintained
ResponsivenessNo issues