Skip to main content
Glama
dsh-mcp-tools
by feely0208

文档比对

compare_docs

Compare two .docx, .md, or .txt files paragraph by paragraph to count modified, added, and deleted paragraphs, show change ratios, and preview changed snippets for version or contract review.

Instructions

按段落比对两份 .docx / .md / .txt,给出修改/新增/删除的段数与改动比例,并预览改动片段。适合合同改版核对、版本差异确认。只读,不修改任何文件。

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": {
      "a": "<a>",
      "b": "<b>"
    },
    "name": "compare_docs"
  }
}

Input Schema

NameRequiredDescriptionDefault
aYes文件 A(基准/旧版)路径。
bYes文件 B(新版)路径。
outNo可选:把完整的 Markdown 比对报告另存到这个路径。
timeout_msNo整体超时(毫秒),默认 120000、上限 600000;超时会终止子进程并返回 timeout 错误。
max_paragraphsNo最多比对多少段。

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.1

TDQS

A4/5.0
Behavior3/5

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

With no annotations, the description has to carry the behavioral load. It does disclose that the tool is read-only and does not modify files, which is the single most important safety fact here. However, that claim is in mild tension with the `out` parameter, which writes a report file, and it says nothing about error behavior, large-document handling, or the subprocess timeout behavior. Some of that is covered in the schema, but the description leaves real gaps.

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, front-loaded with what is compared and what comes back, then use cases, then the safety statement. Nothing is redundant and nothing is buried.

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 5-parameter tool with no output schema and no annotations, the description does the essential work: it describes what the response contains (counts, ratio, preview) and asserts read-only behavior. Remaining gaps, mainly failure modes and the file-writing side effect of `out`, are modest but real.

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%, so the schema already explains every parameter, including the baseline-vs-new semantics of a/b, the `out` report path, timeout_ms, and max_paragraphs. The description adds only the paragraph-granularity concept, which indirectly motivates max_paragraphs. Baseline 3 is correct.

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?

The description names a specific verb and resource pair (按段落比对两份文档), enumerates supported formats (.docx/.md/.txt), and states the produced result (修改/新增/删除的段数与改动比例, plus a change preview). That is enough to separate it from merge_docs and the other siblings without opening any schema.

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 concrete use cases (合同改版核对、版本差异确认) that tell an agent when this tool fits. It stops short of explicit exclusions or naming an alternative, so a 4 rather than a 5.

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

Deploy Server

Other Tools