Skip to main content
Glama

pptx_add_image

Place an image on a PowerPoint slide at given coordinates. Provide width, height, or let the tool preserve aspect ratio.

Instructions

Add an image to a slide at the given inch coordinates.

The w / h arguments control the rendered size:

  • Both given — the picture is stretched to exactly those dimensions (VAL-PPTX-036).

  • Only w given — h is computed from the image's intrinsic aspect ratio (VAL-PPTX-038). Aspect ratio preserved within 1% tolerance.

  • Only h given — w is computed from the image's intrinsic aspect ratio (VAL-PPTX-039).

  • Neither given — the picture is rendered at its natural pixel size at 96 DPI (VAL-PPTX-037).

Args: path: Path to an existing .pptx. image_path: Path to the image to embed (any format python-pptx can read: PNG, JPEG, GIF, BMP, TIFF). x: Left edge in inches. y: Top edge in inches. w: Optional width in inches. None = compute from aspect ratio (when h is given) or use natural size. h: Optional height in inches. None = compute from aspect ratio (when w is given) or use natural size. slide: 0-based slide index. folder: Optional base folder for relative paths. Used for both the deck and the image path.

Returns: {"shape_index": <int>} — 0-based index of the new picture within the slide's shape list.

Raises: OfficeMCPError: ERR_FILE_NOT_FOUND if either the deck or the image file is missing (VAL-PPTX-040); ERR_INVALID_PARAMS for out-of-range slide (VAL-PPTX-041) or non-numeric geometry; ERR_UNSUPPORTED_FMT for non-.pptx extensions.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
pathYes
image_pathYes
xYes
yYes
wNo
hNo
slideNo
folderNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Behavior4/5

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

With no annotations, the description covers key behaviors: size handling, return value (shape_index), and error conditions. It could be more explicit about file modification (assumed) but is otherwise comprehensive.

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 well-structured with sections and bullet points, front-loading the purpose. It is somewhat verbose with validation codes (VAL-PPTX-*), but every sentence adds value for parameter behavior.

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 output schema and 8 parameters, the description covers all aspects: parameter behavior, return value, error conditions. It is complete for an AI agent to invoke correctly.

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?

Schema coverage is 0%, so the description compensates fully: all 8 parameters are explained with units, optionality, and behavior (e.g., w/h logic, folder for relative paths). This adds significant meaning beyond the schema.

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 verb 'add', resource 'image to a slide', and specifies coordinates. It distinguishes from sibling tools like pptx_add_shape and pptx_add_text_box by targeting images only.

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 provides detailed guidelines for parameter usage, especially the w/h logic (stretch, aspect ratio, natural size). However, it does not explicitly contrast with alternatives or indicate when not to use this tool.

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