Skip to main content
Glama

pptx_add_text_box

Add a text box to a PowerPoint slide with custom position and size, and optionally set font properties like size, bold, italic, font name, and color.

Instructions

Add a text box with optional font properties to a slide.

The text box is appended to the slide's shape list and its 0-based index within that slide is returned (VAL-PPTX-031). When font_size / bold / italic / font_name / color are given, they are applied to the text box's first run (VAL-PPTX-032); when any of them is None the corresponding attribute is left at the layout / default value.

Args: path: Path to an existing .pptx. text: Text to put inside the text box. x: Left edge in inches (e.g. 1.0). y: Top edge in inches (e.g. 2.0). w: Width in inches (e.g. 3.0). h: Height in inches (e.g. 0.5). slide: 0-based slide index (VAL-PPTX-034). folder: Optional base folder for relative paths. font_size: Optional font size in points (VAL-PPTX-032). bold: Optional bold flag (VAL-PPTX-032). italic: Optional italic flag. font_name: Optional font name (e.g. "Arial"). color: Optional hex color string ("FF0000").

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

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

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
pathYes
textYes
xYes
yYes
wYes
hYes
slideNo
folderNo
font_sizeNo
boldNo
italicNo
font_nameNo
colorNo

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 provided, the description carries the full burden. It explains that the text box is appended to the slide's shape list, returns a 0-based index, and details font property application behavior (first run, None leaves default). It also lists error conditions and validation codes. However, it doesn't clarify whether the modification is auto-saved or requires a separate save step.

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 clear Args, Returns, and Raises sections. It front-loads the main action. While it is somewhat long, each sentence adds value; minor redundancy could be trimmed (e.g., repeating 'VAL-PPTX codes'), but overall it's efficient.

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 13 parameters, 0% schema coverage, and no annotations, the description covers all aspects: parameter details, return format, error types. It lacks mention of save behavior or undo capability, but otherwise it is sufficiently complete for an agent to use correctly.

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?

Schema coverage is 0%, so the description compensates fully. Every parameter is explained with type, default, and often examples (e.g., inches for geometry, hex for color). The description adds meaning beyond the raw schema, including validation codes and behavior when optional params are None.

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 'Add a text box with optional font properties to a slide,' using a specific verb and resource. It distinguishes from sibling tools like pptx_add_image, pptx_add_shape, and pptx_add_table by explicitly naming the object type (text box) and its purpose.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description does not provide any guidance on when to use this tool versus alternatives (e.g., when to add a text box vs. a shape or image). It lacks explicit context about prerequisites, such as whether a slide must exist, and no exclusion criteria or when-not-to-use statements.

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