Skip to main content
Glama

r7_table

Create, inspect, or modify DOCX tables: add and remove rows and columns, merge cells, set column widths, and format individual cells without altering neighbouring cells.

Instructions

Create, inspect, or modify tables in DOCX documents: add and remove rows and columns, merge and unmerge cells, set column widths, and format individual cells (shading, borders, alignment, width). Cell formatting never rewrites the text or the properties of neighbouring cells.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
cellNoCell coordinate and properties for setCell/formatCell.
rowsNo2D array of rows and cell values for create/addRow. A cell may be a string or an object with the cell properties.
indexNoInsertion index for addRow/addColumn.
mergeNoMerge block for the merge/unmerge actions.
actionYesTable action. "merge" and "unmerge" take merge { row, col, rows, cols }.
valuesNoRow (addRow) or column (addColumn) cell values.
widthsNoAlias of widthsTwips.
bordersNoTable borders for create: false for none, or { top, left, bottom, right, insideH, insideV } with { style, sizePoints, color }.
shadingNoShading applied to every new cell of addRow/addColumn.
filePathYesPath to the DOCX file.
positionNoPosition when creating a table.
rowIndexNoRow to remove.
alignmentNoAlignment for new cells, or for the whole new table.
outputPathNoOptional target path.
tableIndexNo0-based table index for existing tables.
columnIndexNoColumn to remove or where to insert one.
fixedLayoutNoFor setColumnWidths: pin the layout so the widths are honoured (default true).
widthsTwipsNoColumn widths in twips for create/setColumnWidths (and per-cell widths for addRow).
includeStylesNoFor inspect: also return normalized cell formatting (widths, merges, shading, borders, alignment).
verticalAlignNoVertical alignment for new cells.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.1

TDQS

B3.2/5.0
Behavior3/5

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

No annotations are present, so the description carries the full burden. It does disclose one genuinely useful, non-obvious trait: cell formatting 'never rewrites the text or the properties of neighbouring cells.' But it is silent on the biggest behavioral question for a multi-action writer tool — whether edits mutate the source file in place or honour outputPath, and whether operations are destructive/irreversible.

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?

Two sentences, tightly front-loaded with the capability list followed by the one caveat. No filler, though the long comma-separated operation list is dense for an 11-action tool.

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

Completeness3/5

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

For a 20-parameter, 11-action tool with no annotations and no output schema, the description is only high-level. It does not indicate which parameters each action requires (e.g. cell for setCell/formatCell, rowIndex/columnIndex for removals, merge block for merge/unmerge) or what inspect/compute-style returns look like, leaving real gaps for correct invocation.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100%, so the schema already documents all 20 parameters with aliases, units and enums; the baseline is 3. The description's mention of shading, borders, alignment and width loosely maps to the cell object but adds no syntax or format detail beyond the schema.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description states a specific verb set and resource ('Create, inspect, or modify tables in DOCX documents') and then enumerates the sub-operations (rows, columns, merge, widths, cell formatting). An agent can tell this is the table-specific tool rather than a document-wide one, though it never names or contrasts the nearest sibling, r7_docx_formatting.

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?

It lists what can be done but gives no when-to-use guidance: no routing versus r7_docx_formatting or r7_edit, no prerequisites (e.g. an existing file and tableIndex are needed for modify actions), and no hint about which action suits which goal. The action enum is left to be inferred from the prose.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.