Skip to main content
Glama
SiYuan MCP Server
by MyrkoF

read_database

Retrieve fields, entries, and values from SiYuan Attribute View databases; list databases, load a full database, filter entries by field value, or fetch a single entry by ID.

Instructions

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).

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {},
    "name": "read_database"
  }
}

Input Schema

NameRequiredDescriptionDefault
idNoDatabase ID (Attribute View block ID). Required except for mode:"list".
modeNoSet to "list" to list all databases (no id needed).
filterNoFilter entries by field value.
viewIdNoView ID to render. Each view has its own filters/sorts. If omitted, uses the last active view in the GUI. Tip: create a "MCP" view with no filters for unfiltered access.
entryIdNoEntry ID to fetch a single entry.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv2.1.1

TDQS

A3.7/5.0
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations provided, the description carries the full behavioral burden. It discloses the mode taxonomy and the id-required-except-for-list constraint, which is useful. It omits pagination/size limits, permission requirements, and how much data a full-DB read returns, so the safety and cost profile of a large read is still unclear.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The purpose is front-loaded and the mode list is packed into a single compact sentence with no filler. The density is high but readable; nothing is wasted. A slightly clearer separation of modes would help, but it is well-sized for a 5-parameter tool.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

There is no output schema and no annotations, so the description should do more to characterize what comes back for each mode (fields, entries, values is only a hint) and the cost of reading a whole database. The input side is fully covered between the description and the schema, but the return side is thin for a tool with four distinct result shapes.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100%, so the baseline would be 3. The description exceeds that by stating which parameter combinations are valid per mode (id only vs. id+filter vs. id+entryId), which the schema alone does not express. It adds little on filter matching semantics, but the schema covers those.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description opens with a specific verb and resource ("Read Attribute View (database) data: fields, entries, values") and clarifies the tool's domain name mapping (Attribute View = database). It then enumerates four distinct operating modes, which makes the tool's scope concrete. It does not name a sibling to differentiate against, but the read-only scope is clear against write_db_rows or delete_db_rows.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Each mode is paired with the parameter combination that selects it: mode:"list" for all DBs, id alone for a full DB, id + filter for filtered entries, id + entryId for a single entry. That is actionable when-to-use guidance for the tool's own variants. It stops short of saying when to prefer siyuan_sql or list_views instead.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.