Skip to main content
Glama
chyinan

MCP Word Commander

by chyinan

replace_image

Replace an image in a Word document by specifying its index and a new image file. Optionally set the new image dimensions.

Instructions

替换文档中指定索引的图片。 使用 get_images_info 工具可以查看所有图片的索引。

Args: file_path: 文档路径 image_index: 要替换的图片索引 (0-based) new_image_path: 新图片文件路径 width_inches: 新图片宽度 (英寸),不指定则使用原图片尺寸 height_inches: 新图片高度 (英寸)

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
file_pathYes
image_indexYes
width_inchesNo
height_inchesNo
new_image_pathYes

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes
Behavior2/5

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

No annotations are provided, so the description must carry the burden of behavioral disclosure. It states that width and height are optional and default to original if not specified. However, it does not mention what happens on invalid indices, missing files, or whether the operation is destructive. This is insufficient for a mutation tool.

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 concise and includes a helpful note about get_images_info. It is front-loaded with the purpose and argument list. No superfluous content.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/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, return values need not be detailed. However, the description lacks error handling, side effects, and prerequisites (except get_images_info). For a document modification tool, more context is needed for safe usage.

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

Parameters2/5

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

Schema description coverage is 0%, so the description must compensate. It lists parameters but adds minimal semantics: image_index is 0-based, width_inches defaults to original. The file_path and new_image_path are not described beyond names. For 5 parameters, this is inadequate.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/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: replacing an image at a specified index in a document. It also suggests using get_images_info to find indices, which adds context. However, it does not explicitly distinguish from siblings like delete_image or insert_image_after_paragraph, though 'replace' is distinct enough.

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 description implies usage by mentioning the need to know the image index via get_images_info. It does not specify when not to use this tool or mention alternative tools like delete_image or insert_image_after_paragraph. More explicit guidance would improve clarity.

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/chyinan/MCP-Word-Commander'

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