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

合并文档

merge_docs

Merge .docx, .md, and .txt files or directories into one .docx with a table of contents, useful for combining weekly reports, contract attachments, or chapter drafts into a single delivery file.

Instructions

把多份 .docx / .md / .txt(文件或目录)合并成一份带目录的 .docx。适合「把周报/合同附件/章节稿拼成一份交付文档」。只写 out 指定的文件,不删改输入。

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": {
      "inputs": "<inputs>"
    },
    "name": "merge_docs"
  }
}

Input Schema

NameRequiredDescriptionDefault
outNo输出的 .docx 路径。默认在当前工作目录生成 merged-<时间>.docx。
sortNo目录内文件的排序方式。name
inputsYes要合并的文件或目录路径(按给出顺序;给目录时按文件名排序)。
dry_runNo只预演,不写文件。
page_breakNo每份文件是否另起一页。
timeout_msNo整体超时(毫秒),默认 120000、上限 600000;超时会终止子进程并返回 timeout 错误。
title_fromNo每份文件的章节标题来源,默认 filename(文件名)。filename
strip_titleNo是否去掉各文件开头的一级标题,避免与章节标题重复。

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.1

TDQS

A4.2/5.0
Behavior4/5

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

With no annotations supplied, the description carries the full burden and does disclose the key side-effect profile: it writes only the file named by out and does not delete or modify inputs. It leaves out whether an existing out file is overwritten and what the call returns on success, which are the remaining behavioral 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: output shape first, then the use-case framing, then the write-safety constraint. Every sentence carries information an agent needs, and nothing is buried or repeated.

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 an 8-parameter tool with a fully documented schema, the description covers purpose, use case, and write safety adequately. Since there is no output schema, it should ideally state what the tool returns (e.g., the output path or a summary), which is the one gap keeping it from a 5.

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%, and every parameter (out, sort, inputs, dry_run, page_break, timeout_ms, title_from, strip_title) is already documented with defaults, ranges, and enums in the schema. The description only echoes the out path constraint, adding essentially no semantic detail beyond the structured fields, so the baseline of 3 applies.

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 (合并/merge) plus the resource (multiple .docx/.md/.txt files or directories) and the result shape (a single .docx with a table of contents). It also enumerates accepted input formats, so an agent can tell this is a document-assembly operation distinct from compare_docs or the audit/release siblings.

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 an explicit when-to-use scenario ('把周报/合同附件/章节稿拼成一份交付文档'), which is concrete enough to route most requests correctly. It stops short of when-not conditions or naming an alternative tool for the compare/audit cases, so it falls 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.

Deploy Server

Other Tools