Skip to main content
Glama

word_add_image

Embed an image into a Word document, optionally scaling to a specified width while preserving aspect ratio.

Instructions

Embed an image in the document body.

When width_inches is provided, the image is scaled to that width and the height is auto-computed from the image's intrinsic aspect ratio (VAL-WORD-050 / VAL-WORD-078). When omitted, the image is embedded at its native pixel size.

Args: path: Path to an existing .docx. image_path: Path to the image file (PNG / JPEG / GIF / etc.). width_inches: Optional target width in inches (must be positive). When None the image is embedded at its native size. folder: Optional base folder for the path argument (does not apply to image_path, which is always resolved absolutely or relative to the caller's CWD).

Returns: {"index": <n>} where <n> is the index of the new inline shape in doc.inline_shapes.

Raises: OfficeMCPError: ERR_FILE_NOT_FOUND if either path is missing, ERR_INVALID_PARAMS for an unsupported image format or a non-positive width_inches, ERR_UNSUPPORTED_FMT for non-.docx extensions.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
pathYes
image_pathYes
width_inchesNo
folderNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Behavior5/5

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

With no annotations provided, the description fully covers behavioral traits: scaling behavior (auto-compute height when width_inches given, native size otherwise), argument resolution (folder for path, not image_path), return value structure, and specific error conditions. This exceeds the burden typically required.

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?

The description is well-structured with a clear first sentence stating purpose, followed by detailed sections (scaling, Args, Returns, Raises). Every sentence adds value and there is no redundancy. It is appropriately sized for the tool's complexity.

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

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the tool has 4 parameters, a return value, and error cases, the description covers all necessary aspects: purpose, parameter details, return format, and error conditions. The presence of an output schema is noted but not needed as the description already specifies the return value.

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?

The input schema has 0% description coverage, so the description must add meaning. It does so comprehensively in the Args section, explaining each parameter's purpose, constraints (e.g., width_inches must be positive), and behavior (folder does not apply to image_path).

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 'Embed an image in the document body,' using a specific verb and resource. It distinguishes itself from sibling tools like pptx_add_image (different application) and other word tools by specifying the context of a .docx document.

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 for embedding images in Word documents but does not explicitly explain when to use this tool over alternatives like pptx_add_image for PowerPoint or other word formatting tools. No when-not-to-use guidance is provided.

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/gawirable/office-mcp'

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