Skip to main content
Glama

apply_to_matching

Batch-update XMind nodes whose titles contain a keyword: set styles, add or remove markers and labels, and preview changes before applying.

Instructions

按标题关键词批量修改节点:设置样式、添加/移除标记、添加/移除标签。

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": {
      "file_path": "<file_path>",
      "keyword": "<keyword>"
    },
    "name": "apply_to_matching"
  }
}

Input Schema

NameRequiredDescriptionDefault
styleNo要设置的样式(可选),键与 set_node_style 一致
keywordYes标题包含的关键词(不区分大小写)
previewNo只返回将影响的节点,不实际修改(默认 false)
auto_saveNo是否自动保存(默认 false)
file_pathYes.xmind 文件路径
add_labelsNo要添加的标签列表
add_markersNo要添加的标记 ID 列表
remove_labelsNo要移除的标签列表
remove_markersNo要移除的标记 ID 列表

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.5.0

TDQS

B3.1/5.0
Behavior2/5

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

The annotations already declare readOnlyHint=false, destructiveHint=false, and openWorldHint=false, yet the description adds no behavioral detail beyond 'batch modify'. It never mentions the preview mode that returns affected nodes without writing, the auto_save default of false, whether changes persist to disk, or what happens when zero nodes match the keyword.

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?

A single compact sentence with the matching criterion ('按标题关键词') front-loaded before the list of mutations. Nothing is wasted, though the brevity is partly why behavior and preview semantics go unaddressed.

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

Completeness2/5

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

For a 9-parameter mutation tool with a nested style object and no output schema, one sentence is thin. Critical operational facts — that a preview mode exists to inspect affected nodes before writing, and that auto_save defaults to off — are left for the agent to discover in the schema rather than being surfaced in the description.

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%, with every parameter — including case-insensitive keyword matching and the style object's set_node_style-compatible keys — documented in the schema itself. The description's phrase '按标题关键词' overlaps the keyword field but adds no syntax, default, or constraint detail beyond what the schema provides, so the 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?

States a concrete verb and resource: batch-modify nodes matched by title keyword, including three operation families (style, markers, labels). This clearly distinguishes it from single-node mutators such as add_node or duplicate_node, but it never names or contrasts any sibling tool.

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?

The 'by title keyword' framing implies when to choose this tool (bulk application) versus single-node editing, but there is no explicit when-not guidance, no mention of apply_style_preset as an alternative, and no prerequisites such as the target file needing to exist.

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