Run read-only SQL SELECT queries to perform advanced cross-field and cross-table searches in the SiYuan knowledge base, with sensitive data automatically masked.
Retrieve content blocks added or modified within a given time range to build change lists or indexes. Returns current block snapshots without before/after diffs.
Retrieve content block changes within a specified time range, returning before/after text and diff statistics to audit edits and identify added, removed, or replaced content.
Insert a new block at a precise position in SiYuan: before or after an existing block, or as a child of a parent block. Specify next_id, previous_id, or parent_id to control placement.
Move existing blocks in SiYuan to reorder them or change parent-child relationships. Specify previous_id for ordering or parent_id for nesting, preserving related content by moving block groups.
Insert content as the first child of a specified parent block to maintain a stable hierarchy. Provide parent_id and data to prepend markdown or DOM blocks without relying on adjacent positions.
Appends a block as the last child of a specified parent block, ensuring stable hierarchy. Ideal for adding lists or content under a heading without affecting sibling order.
Search SiYuan notes for content blocks by keyword, block type, parent, or time range. Retrieve matching blocks with filtered results to locate specific notes efficiently.
Explore a SiYuan workspace directory by listing its files and folders at a specified path. Read-only operation helps inspect structures like snapshot history.
Retrieve past versions of notes by reading historical snapshot files from the SiYuan knowledge base. Access read-only content with sensitive data masked for secure review.
Search across the workspace to find matching blocks with IDs and document paths before reading or editing. Supports operators like AND, OR, exact phrases, exclusions, and wildcards.
Run read-only SQL queries against the SiYuan index to count blocks or filter by tag and attribute when other tools cannot. Only SELECT, WITH, and EXPLAIN statements are allowed.
Delete a specified block from SiYuan knowledge base to clean up erroneous or unwanted content. Confirm the block ID before calling, as the action is permanent.