Skip to main content
Glama

table_row_insert

Insert a tracked row into a body table after a chosen row, with one text per cell. It refuses insertion across a vertical merge, keeping document revisions valid.

Instructions

Insert a row into a body table as a tracked change (w:trPr/w:ins, tracked text), after row after_row, one text per cell. Refused between two rows that a vertical merge spans.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
docYesPath to the .docx.
tagNoAppended to the author.
cellsYesOne text per cell of the row it follows (the first row for after_row 0); a horizontally merged cell is one cell.
tableYesTable number as `table.get` numbers it: 1-based, in document order, main story only (a table in a note, header or footer cannot be named here).
authorNoRevision author.
expectNo
dry_runNoPreview only; write nothing.
after_rowYesInsert after this row (1-based); 0 inserts before the first row.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.4/5.0
Behavior4/5

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

With only readOnlyHint=false available, the description carries extra weight and delivers: it discloses that the insert is recorded as a tracked change ('w:trPr/w:ins, tracked text') and states the vertical-merge refusal rule. It omits mention of dry_run/preview behavior and author/expect semantics, so it is strong but not exhaustive.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Two dense sentences, zero filler, with the operation, the anchor parameter, and the failure condition all front-loaded. Every clause carries information an agent needs.

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?

For an 8-parameter mutation tool with no output schema, the description covers the critical gotchas (tracked-change semantics, vertical-merge refusal, body-table-only scope). Return/result expectations, coordination with dry_run, and expect.sha256 are left to the schema.

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 already 88%, but the description reinforces cross-parameter semantics by tying `cells` to `after_row` ('one text per cell', inserting after the followed row) and scoping the table to the body store. It adds limited new syntax beyond the schema, which already documents the fields.

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?

States a specific verb+resource ('Insert a row into a body table') plus the exact insertion point ('after row `after_row`') and the change-tracking mode. It is unambiguous against siblings like table_row_delete and table_get, and even names the OOXML markers (w:trPr/w:ins).

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?

Provides a clear when-not condition: it is 'Refused between two rows that a vertical merge spans', and scopes the tool to 'body table' rows. It does not explicitly name a sibling alternative (e.g. for non-tracked insertion), so it stops short of full routing guidance.

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