Skip to main content
Glama
SiYuan MCP Server
by MyrkoF

Server Configuration

Describes the environment variables required to run the server.

NameRequiredDescriptionDefault
SIYUAN_TOKENNoLegacy alias for SIYUAN_API_TOKEN.
SIYUAN_API_URLNoSiYuan base URL. If omitted, auto-discovers port 6806-6808.
SIYUAN_BASE_URLNoLegacy alias for SIYUAN_API_URL.
SIYUAN_API_TOKENNoSiYuan API token (Settings > About > API token). Required.

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
{}
prompts
{}
resources
{}

Tools

Functions exposed to the LLM to take actions

NameDescription
siyuan_sqlA

Execute a SQL SELECT on SiYuan's SQLite database. Use for ALL reads: blocks, documents, tags, backlinks, search. Read the siyuan://static/sql-schema resource for table schema and example queries. NOTE: Attribute View (database) data is NOT in SQLite — use read_database instead.

read_databaseA

Read Attribute View (database) data: fields, entries, values. Supports modes: list all DBs (mode:"list"), read full DB (id only), filter entries (id + filter), get single entry (id + entryId).

workspace_mapA

Get a map of the SiYuan workspace: all notebooks, top-level documents (2 levels), and all Attribute View database IDs. Call this first to orient yourself.

list_notebooksB

List all notebooks, or create a new one. Without params: returns all notebooks with IDs. With name: creates a new notebook.

create_documentA

Create a document (or subdocument) in a notebook. Use nested path for subdocuments: path:"/Parent/Child". Returns the document block ID — use it as parentDocId in create_database to embed a DB inside this doc.

update_documentA

Rename, replace content, and/or move a document. Provide title to rename, content to replace body, parentId to move under another doc.

delete_documentA

Delete a document. Use dryRun:true to preview without deleting. Set cascade:true to also delete child documents.

insert_blockB

Insert a markdown block into a document. To embed an existing database, use:

update_blockB

Replace the content of an existing block.

batch_block_opsB

Execute multiple block operations in one call. Each operation: action "insert", "update", or "delete".

create_databaseA

Create a new Attribute View database. With parentDocId: embeds the database TABLE INSIDE that document (appears as content in the page). Without parentDocId: creates a standalone DB page at notebook root. Do NOT include "block" in fields — the primary Name field is auto-created.

write_db_rowsC

Create one or more entries (rows) in a database. Each row can have a name and initial field values.

update_db_cellsC

Update field values in one or more database entries. Each update targets an entry and specifies which cells to change.

delete_db_rowsC

Delete one or more entries from a database.

list_viewsA

List database views and their current layout/group/filter/sort configuration.

add_viewC

Add a new table, kanban, or gallery view to a database.

update_viewB

Update an existing database view layout, name, grouping, filters, or sorts.

delete_viewC

Delete a database view by ID.

bind_row_to_docB

Convert an existing detached row into a document-backed row bound to an existing document.

create_doc_backed_rowC

Create a new document and add it to the database as a document-backed row.

list_select_optionsB

List the current options for a select or multi-select database field.

set_select_optionsC

Set or update the available options for a select or multi-select database field.

rename_notebookC

Rename a notebook by ID.

manage_db_fieldsA

Add or remove fields (columns) in a database. Renaming is not supported by SiYuan API — use the GUI.

set_block_attrsB

Set custom attributes (key-value metadata) on any block. Also used for tags.

upload_assetB

Upload a file as a SiYuan asset. Provide base64-encoded file content.

Prompts

Interactive templates invoked by user choice

NameDescription
note-search-assistantNote search assistant - search and find information in SiYuan notes
document-creatorDocument creation assistant - create structured document content
content-summarizerContent summarization assistant - summarize and analyze document content
knowledge-connectorKnowledge connection assistant - discover and build connections between ideas
learning-path-plannerLearning path planner - create personalized study plans
writing-assistantWriting assistant - help create various types of documents

Resources

Contextual data attached and managed by the client

NameDescription
SiYuan MCP v2 — Object Model & RulesSiYuan object types, IDs, and critical rules for correct tool use
SiYuan SQL Schema & ExamplesSQLite table schema and example queries for use with siyuan_sql tool
SiYuan MCP v2 — CRUD WorkflowsStep-by-step tool sequences for common operations

TDQS

B3.2/5.0

Scored across 26 tools

Disambiguation4/5

Most tools target clearly distinct resource+action pairs, and descriptions actively help (siyuan_sql explicitly defers database reads to read_database, workspace_map is flagged as the entry point). The main friction is that insert_block/update_block duplicate the 'insert'/'update' actions of batch_block_ops, and list_notebooks secretly doubles as create, so a few boundaries need the description to resolve.

Naming Consistency4/5

The dominant pattern is verb_noun snake_case (create_document, update_block, delete_view, set_select_options, upload_asset), which is predictable. Deviations are minor but present: workspace_map and batch_block_ops are bare noun phrases, and siyuan_sql is namespaced unlike anything else.

Tool Count3/5

26 tools is at the heavy end, and the domain (notebooks, documents, blocks, attribute-view databases, views, fields, rows, options, assets) genuinely justifies most of them. Still, redundancy exists — insert_block/update_block overlap with batch_block_ops, and there are five view/field management tools alongside a dual-purpose list_notebooks — so the surface could be trimmed.

Completeness3/5

Core lifecycle is covered: notebooks (create/rename), documents (create/update/delete), blocks (insert/update/attr, delete via batch), databases (rows/fields/views/select options full CRUD), and assets. Notable gaps remain: no delete_notebook, no standalone delete_block, no asset listing/removal, and field renaming is explicitly unsupported, forcing agents to drop to SQL or the GUI.

Maintenance

ActivityInactive
ResponsivenessNo recent community issues