合并文档
merge_docsMerge .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
| Name | Required | Description | Default |
|---|---|---|---|
| out | No | 输出的 .docx 路径。默认在当前工作目录生成 merged-<时间>.docx。 | |
| sort | No | 目录内文件的排序方式。 | name |
| inputs | Yes | 要合并的文件或目录路径(按给出顺序;给目录时按文件名排序)。 | |
| dry_run | No | 只预演,不写文件。 | |
| page_break | No | 每份文件是否另起一页。 | |
| timeout_ms | No | 整体超时(毫秒),默认 120000、上限 600000;超时会终止子进程并返回 timeout 错误。 | |
| title_from | No | 每份文件的章节标题来源,默认 filename(文件名)。 | filename |
| strip_title | No | 是否去掉各文件开头的一级标题,避免与章节标题重复。 |