Skip to main content
Glama

pptx_add_table

Add a table to a PowerPoint slide. Specify position and size, optionally fill cells with data.

Instructions

Add a table to a slide.

When data is None the table is created with every cell empty (VAL-PPTX-047). When data is shorter than rows x cols the missing cells are padded with empty strings (VAL-PPTX-048). All cell values are coerced to str before being written.

Args: path: Path to an existing .pptx. rows: Number of rows (must be > 0; VAL-PPTX-050). cols: Number of columns (must be > 0). 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-049). folder: Optional base folder for relative paths. data: Optional 2D list of cell values, row-major.

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

Raises: OfficeMCPError: ERR_INVALID_PARAMS for non-positive rows / cols (VAL-PPTX-050), out-of-range slide (VAL-PPTX-049), 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
rowsYes
colsYes
xYes
yYes
wYes
hYes
slideNo
folderNo
dataNo

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 compensates fully. It explains behavior for various scenarios: data None, short data, cell value coercion to str. It also details errors raised (ERR_INVALID_PARAMS, ERR_FILE_NOT_FOUND, ERR_UNSUPPORTED_FMT) and specifies validation codes (VAL-PPTX-047-050). This provides complete transparency.

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 standard docstring sections (description, Args, Returns, Raises). It is appropriately sized for the tool's complexity (10 parameters). Could be slightly more concise, but every sentence adds value. No unnecessary repetition.

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 10 parameters with no annotations and an output schema, the description covers all needed context: parameter semantics, edge cases, error handling, and return value format. It is complete for an agent to correctly use the tool.

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 description coverage is 0%, so the description bears the full burden. It explains each parameter in the Args section: path (existing .pptx), rows/cols (>0), geometry in inches, slide (0-based), folder (optional), data (optional 2D list). It adds meaning beyond the schema, such as constraints and validation codes, making it highly informative.

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 table to a slide' with a specific verb and resource. It distinguishes itself from sibling tools like pptx_add_chart or pptx_add_image by focusing on table addition. The title and name reinforce this purpose.

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 usage guidelines, such as when data is None (empty cells) or when data is shorter (padding with empty strings). It also mentions validation error codes. However, it does not explicitly instruct when to use this tool versus alternatives (e.g., when to choose pptx_add_table over others), which is reasonable given the sibling list is diverse.

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