Skip to main content
Glama
SiYuan MCP Server
by MyrkoF

set_block_attrs

Set custom key-value metadata on any SiYuan block to track status, priority, or tags. Use it to attach and update attributes directly from AI workflows.

Instructions

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

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": {
      "id": "<id>",
      "attrs": "<attrs>"
    },
    "name": "set_block_attrs"
  }
}

Input Schema

NameRequiredDescriptionDefault
idYesBlock ID
attrsYesKey-value pairs to set. Example: {"custom-status": "reviewed", "custom-priority": "high"}

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv2.1.1

TDQS

B3.2/5.0
Behavior2/5

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

No annotations are supplied, so the description carries the full burden. It indicates a mutation of block metadata but says nothing about whether existing attributes are preserved or replaced, whether reserved/system keys are rejected, what permissions are required, or what the tool returns. For a mutation tool with zero annotation coverage this is a substantial gap.

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?

Two short sentences, front-loaded with the primary action and followed by one relevant secondary use case. No filler, though the second sentence is fragmentary and could have carried a bit more behavioral detail without bloat.

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 simple two-parameter tool with a fully documented schema and no output schema, the definition covers the basics. The critical missing piece is write semantics (merge vs. replace) and any constraints on keys, which an agent needs before invoking a metadata mutation.

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 coverage is 100% and both parameters are documented in the schema, including an example of the attrs object, so the baseline of 3 applies. The description adds the useful notion that attrs are 'key-value metadata' and usable for tags, but it does not mention the string-only value constraint or merge semantics that the schema leaves implicit.

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?

States a concrete verb and resource: "Set custom attributes (key-value metadata) on any block." The parenthetical clarifies the nature of attributes and "on any block" establishes scope. It does not explicitly contrast with the sibling update_block, which could plausibly be confused with this tool, 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 Guidelines3/5

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

"Also used for tags" hints at a second use case, which is useful context for an agent deciding between this and other block-mutation tools. However, there is no guidance on when to prefer this over update_block, whether it merges or overwrites existing attributes, or which attribute keys are reserved.

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