Skip to main content
Glama

repair_file

Destructive

Repairs unopenable XMind files by rebuilding required metadata, content, themes, and revision data, restoring a blank canvas if content.json is missing while preserving attachments and backing up the original.

Instructions

修复打不开的 XMind 文件:自动补全 metadata.json、content.xml、默认主题、revisionId 等 XMind 必需内容;若 content.json 缺失或损坏,会重建空白画布并保留 zip 内的附件资源。覆盖保存前会自动备份原文件。

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>"
    },
    "name": "repair_file"
  }
}

Input Schema

NameRequiredDescriptionDefault
file_pathYes.xmind 文件路径
output_pathNo修复后另存的路径(可选,省略则覆盖原文件)

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.5.0

TDQS

A4.5/5.0
Behavior5/5

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

Annotations already flag destructiveHint=true; the description goes further by naming the destructive path (omitting output_path overwrites the original) and the mitigation (an automatic backup of the original before overwriting). It also discloses the data-loss boundary precisely — attachments inside the zip are preserved, content.json may be replaced with a blank canvas — which is exactly the extra context an agent needs beyond the annotations.

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?

Purpose and precondition are front-loaded, then repair scope, then the destructive/backup behaviour — a sensible order with no filler. It is one semicolon-chained sentence-block, slightly dense to parse, but every clause carries information.

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

Completeness4/5

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

For a 2-parameter tool with no output schema and no nesting, the description covers scope, destructive behaviour, backup mitigation, and the corruption fallback. It does not say what the tool reports on success or what happens when the file is unrepairable, which is the remaining gap.

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 coverage is 100%, so both parameters are already documented, making 3 the baseline. The description adds value beyond the schema by attaching a consequence to the optional output_path: choosing to overwrite triggers an automatic backup, which the schema's '省略则覆盖原文件' does not mention.

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

Purpose5/5

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

States a specific verb and object (修复打不开的 XMind 文件) and then enumerates exactly what is restored — metadata.json, content.xml, default theme, revisionId — plus the fallback when content.json is missing or corrupt. This distinguishes it from creation/analysis siblings that operate on healthy files, since the precondition (a file that won't open) is explicit.

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?

The trigger condition is clear: use it on a .xmind file that can't be opened, and it degrades gracefully by rebuilding a blank canvas while preserving zip attachments. There is no explicit when-not guidance (e.g. don't use it on normal files, use create_file or save_file instead) and no sibling is named, so it stops short of a 5.

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