Skip to main content
Glama
SiYuan MCP Server
by MyrkoF

manage_db_fields

Add or remove fields (columns) in a SiYuan database, including relation and rollup fields, by specifying the database ID, field type, and action.

Instructions

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

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": {
      "avId": "<avId>",
      "action": "<action>"
    },
    "name": "manage_db_fields"
  }
}

Input Schema

NameRequiredDescriptionDefault
avIdYesDatabase ID
nameNoField name (required for add)
typeNoField type (required for add)
actionYes"add" to create a field, "remove" to delete one
rollupNoRequired when adding a rollup field
fieldIdNoField ID to remove (required for remove)
relationNoRequired when adding a relation field

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv2.1.1

TDQS

A3.5/5.0
Behavior2/5

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

No annotations are provided, so the description carries the full behavioral burden and largely drops it. 'Remove' is destructive, yet the description never says whether deleting a field also destroys the column's cell data or whether it's reversible, nor does it mention permission requirements or what the call returns. The only extra context offered is the renaming limitation.

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?

Two short sentences, front-loaded with the primary capability, followed by a single high-value caveat. Nothing is padded or redundant.

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?

With 7 parameters, nested relation/rollup objects, and no output schema or annotations, the definition is only partly complete. The schema covers parameter mechanics well, but the description leaves the mutation's consequences (data loss on remove) and the return value undocumented, which matters for an unannotated destructive schema-editing tool.

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%, including nested relation and rollup objects with their own field-level descriptions, so the schema already explains every parameter. The description adds nothing about the conditional requirements (name/type for add, fieldId for remove, rollup and relation objects) beyond what the schema states, so baseline 3 applies.

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 pair and resource: 'Add or remove fields (columns) in a database.' That maps directly onto the action enum and clearly separates it from row-level siblings like update_db_cells or write_db_rows (it's a schema-level operation). It doesn't name any sibling explicitly, so it stops short of a 5.

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?

Gives a real when-not: renaming is not supported by the SiYuan API and must be done in the GUI, which prevents a failed call attempt. It does not, however, cover when to choose add vs remove, or prerequisites such as needing an existing database/field or what happens when a remove is passed a bad fieldId.

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