Skip to main content
Glama

export_consulting_docx

Compile multi-chapter Markdown into publication-ready Word (.docx) consulting reports with covers, TOC, native headings, three-line tables, and auto-renumbered references.

Instructions

将多章节 Markdown 编译导出为符合中国工程咨询与政企出版规范的 Word (.docx) 报告文件。

内置特性:
- 标准封面、自动目录(TOC)与页眉页脚
- 多级工程标题与正文粘连智能清洗拆分,100% 映射为 Word 原生 Heading 样式
- Markdown 表格自动渲染为出版级标准学术/工程三线表
- 全文【源:...】【标:...】【网:...】引用按首次出现顺序自动重编号为 [1], [2], [3]... 并在文末生成标准《参考文献》章(联网文献保留完整 URL)

参数:
    chapters: 章节序号到章节 Markdown 正文的字典,例如 {"1": "# 第一章...", "2": "# 第二章..."}。
    title: 报告主标题(封面与正文大标题,如 "长三角绿色智能算力枢纽项目可行性研究报告")。
    project: 项目标识名(用于生成默认文件名与匹配项目底稿库)。
    report_type: 报告类型(如 "可行性研究报告"、"智库专报")。
    subtitle: 封面副标题标识(默认 "( 初 稿 )")。
    author_org: 编制单位名称(可选,显示在封面底部)。
    qualification: 工程咨询资信或资质编号(可选)。
    date_str: 编制日期字符串(可选,如 "二〇二六年十一月")。
    include_cover: 是否生成专业封面(默认 True)。
    include_toc: 是否生成目录页(默认 True)。
    include_refs: 是否自动汇总生成文末《参考文献》章(默认 True)。
    output_path: 自定义输出 .docx 绝对路径(可选;留空则自动输出至 ENGINE_DATA_DIR/exports/ 目录)。

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": {
      "chapters": "<chapters>",
      "title": "<title>"
    },
    "name": "export_consulting_docx"
  }
}

Input Schema

NameRequiredDescriptionDefault
titleYes
projectNomcp_report
chaptersYes
date_strNo
subtitleNo( 初 稿 )
author_orgNo
include_tocNo
output_pathNo
report_typeNo可行性研究报告
include_refsNo
include_coverNo
qualificationNo

Output Schema

NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.2/5.0
Behavior4/5

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

With no annotations provided, the description carries the full burden and does well: it discloses the generated artifacts (cover, TOC, headers/footers, references chapter), that citations are renumbered by first appearance with URLs preserved, and that output defaults to ENGINE_DATA_DIR/exports/. It stops short of stating overwrite behavior, failure modes, or what the return value contains.

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?

Front-loaded purpose sentence, then a scannable feature list, then a parameter block — well structured and easy to parse. It is long, and a few parameter lines merely restate schema defaults ('默认 True'), but nearly every line adds usable 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 12-parameter, nested-object, no-annotation mutation tool, this covers creation behavior, default output location, and content transformations; an output schema exists so return values need no prose. Gaps remain around overwriting an existing output_path and whether chapter keys must be contiguous/in order, which matter for correct invocation.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters5/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 0% and the schema offers only bare titles like 'Date Str' or 'Author Org', so the description must compensate — and it does for all 12 parameters. It explains formats and intent (e.g. chapters as a numbered dict with a concrete example, date_str as a Chinese numeral date string, project used for default filename and draft-library matching, output_path as an absolute path falling back to the exports directory).

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?

Names a specific verb (compile/export) and resource (multi-chapter Markdown → Word .docx report) with an explicit domain standard ('中国工程咨询与政企出版规范'). The enumerated built-in features (cover, TOC, heading normalization, three-line tables, citation renumbering) make it unmistakable versus siblings like draft_chapter_with_engine or verify_report_consistency.

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 pipeline position is implied — you supply finished chapter Markdown and get a publication-ready document — but there is no explicit 'use this when' statement and no named alternative or exclusion. An agent must infer that this is the terminal export step rather than a drafting or template-listing tool.

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