Skip to main content
Glama
SiYuan MCP Server
by MyrkoF

create_database

Create a new Attribute View database in SiYuan. Embed the table inside an existing document with parentDocId, or create a standalone database page at the notebook root.

Instructions

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.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "notebookId": "<notebookId>",
      "name": "<name>"
    },
    "name": "create_database"
  }
}

Input Schema

NameRequiredDescriptionDefault
nameYesDatabase name (also the page title)
fieldsNoAdditional fields (optional). Primary "Name" field is always auto-created.
notebookIdYesNotebook ID
parentDocIdNoDocument ID to embed the database INTO (the DB table appears as content inside this page)

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, the description carries the full disclosure burden. It does explain the two materially different outcomes (embedded table vs standalone page) and the auto-created Name field, which are genuinely useful behavioral traits. However, it says nothing about required permissions, whether the call is reversible, or what identifier is returned for the new database.

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

Conciseness5/5

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

Three short sentences, each earning its place: purpose, the branching behavior of the key optional parameter, and a hard constraint. The most decision-relevant information (the parentDocId split) is front-loaded.

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?

For a creation tool with no annotations and no output schema, the description covers the input-side decisions well but leaves the outcome opaque — an agent cannot tell what the response contains or how to reference the new database afterward. It is adequate but has a clear gap on the return side.

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

Parameters3/5

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

Schema description coverage is 100%, so the schema already documents all four parameters, making 3 the baseline. The description adds marginal value by restating the parentDocId effect and warning against a "block" field entry not present in the enum, but it does not clarify field-type semantics or ordering beyond what the schema provides.

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 ("Create a new Attribute View database") and immediately splits the behavior into two concrete modes based on parentDocId. It doesn't name a sibling (e.g., create_document) to contrast against, so an agent still has to infer which creation tool to pick when it doesn't want a database.

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?

It gives clear conditional guidance: supply parentDocId to embed the table as page content, omit it to get a standalone DB page at notebook root. It also adds a negative constraint (do not include "block" in fields), but offers no exclusion relative to alternative tools such as create_document.

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