Skip to main content
Glama
u9401066

asset-aware-mcp

by u9401066

save_docx

Writes edited content back to .docx, merging DFM or Markdown changes and rebuilding the file. Supports Word Track Changes for optional review of edits.

Instructions

將編輯後的內容存回 .docx 檔案。

支援兩種模式:

  • DFM 模式(預設):傳入 dfm_content(.dfm 格式全文)

  • MD 模式(from_md=True):從磁碟讀取 content.md + format.yaml

回寫流程:

  1. 解析 DFM/MD → 提取修改

  2. 載入原始 IR

  3. 合併修改(格式合併策略)

  4. 重建 .docx

安全機制:若內容萎縮 > 50%,預設拒絕輸出(疑似資料遺失)。 使用 force=True 強制輸出。

若 track_changes=True,會將 DFM 中的文字修改以真正 Word Track Changes (w:del/w:ins) 寫回,供使用者在 Word 中逐項審查。

Args: doc_id: 文件 ID dfm_content: 編輯後的 DFM 全文(from_md=True 時可省略) output_path: 輸出路徑(預設為 data/{doc_id}/output.docx) from_md: 若為 True,從磁碟讀取 content.md + format.yaml 而非使用 dfm_content force: 若為 True,即使偵測到嚴重內容萎縮仍強制輸出 track_changes: 若為 True,以 Word Track Changes 寫入文字 diff revision_author: 產生追蹤修訂時使用的作者名稱

Returns: 儲存結果

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
forceNo
doc_idYes
from_mdNo
dfm_contentNo
output_pathNo
track_changesNo
revision_authorNoAsset-Aware MCP

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes
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. It discloses key behaviors: the safety check for content shrinkage, the force override, and the track_changes mechanism (writing w:del/w:ins). It also explains the merge strategy and rebuild process. However, it does not mention permissions, side effects, or error handling in detail.

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?

The description is moderately long but well-structured: it starts with a summary, then lists modes, workflow steps, safety mechanism, and a clear parameter list. Every sentence adds value, and the structure is easy to scan.

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?

Given the presence of an output schema (though not shown) and the detailed behavioral description, the description is reasonably complete. It covers modes, safety, tracking, and parameter semantics, but the return value is only briefly stated as '儲存結果' without richer detail on the result object.

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?

Although the schema coverage is reported as 0%, the description includes an Args section that explains each parameter's role (doc_id, dfm_content, output_path, from_md, force, track_changes, revision_author). This adds meaning beyond the bare schema properties, clarifying defaults and conditional behavior.

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 clearly states the tool's purpose: saving edited content back to a .docx file. It specifies two modes (DFM and MD) and outlines the workflow, distinguishing it from sibling tools like ingest_docx or convert_document.

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 description explains when to use DFM mode vs MD mode (from_md=True), the safety mechanism that refuses output when content shrinks >50%, and how force and track_changes parameters alter behavior. It does not explicitly mention when not to use this tool or alternative options, but provides sufficient operational context.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/u9401066/asset-aware-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server