Skip to main content
Glama

pptx_add_shape

Add a shape like rectangle or oval to a PowerPoint slide. Specify position, size, and optional text; returns the shape index.

Instructions

Add a shape (rectangle, oval, etc.) to a slide.

shape_type is one of the case-insensitive names mapped by :data:_SHAPE_TYPE_MAP — the supported set covers the most common MSO_SHAPE members (VAL-PPTX-042 for rectangle, VAL-PPTX-043 for oval and rounded rectangle). An unknown type returns ERR_INVALID_PARAMS and the deck is left unchanged (VAL-PPTX-044).

Args: path: Path to an existing .pptx. shape_type: Shape type (e.g. "rectangle", "oval", "rounded_rectangle"). See :data:_SHAPE_TYPE_MAP. x: Left edge in inches. y: Top edge in inches. w: Width in inches. h: Height in inches. slide: 0-based slide index (VAL-PPTX-045). folder: Optional base folder for relative paths. text: Optional text to put inside the shape's text frame.

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

Raises: OfficeMCPError: ERR_INVALID_PARAMS for an unknown shape type, out-of-range slide, or non-numeric geometry; ERR_FILE_NOT_FOUND if the file is missing; ERR_UNSUPPORTED_FMT for non-.pptx extensions.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
pathYes
shape_typeYes
xYes
yYes
wYes
hYes
slideNo
folderNo
textNo

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, the description fully covers behavioral traits: it adds a shape, describes unknown shape type behavior (error, deck unchanged), and lists all possible errors (ERR_INVALID_PARAMS, ERR_FILE_NOT_FOUND, ERR_UNSUPPORTED_FMT).

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 structured with a brief summary, Args/Returns/Raises sections, and front-loads purpose. It is slightly verbose but well-organized.

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?

For a tool with 9 parameters and no enums, the description covers all parameters, errors, and return value (shape_index). It is complete given the complexity and presence of an output schema.

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?

Despite 0% schema description coverage, the description explains each parameter in detail (e.g., shape_type with examples, x/y/w/h in inches, slide as 0-based index), fully compensating for the schema's lack of descriptions.

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' and the resource 'shape (rectangle, oval, etc.) to a slide', distinguishing it from sibling tools like pptx_add_image, pptx_add_text_box, etc.

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 useful context on shape type support and error handling but does not explicitly enumerate when to use this tool over alternatives; however, the sibling tools are distinct enough that implicit differentiation is adequate.

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