Skip to main content
Glama

insert_row

Insert a row into a table at a specified position using column values. Uses a version hash to ensure the table hasn't changed, preventing write conflicts.

Instructions

Insert a new row. Requires version hash from read_table.

Provide values as a dict mapping column identifiers to cell content. Column identifiers: letter ("A"), name ("Priority"), or composite ("B:Priority"). Omitted columns default to empty string.

On success returns ONLY v:{new_hash}. On error returns JSON with "error" and "message" fields.

Args: file_path: Absolute path to the Markdown file. table_index: 0-based table index from list_tables. version: 12-char hex hash from read_table (after "v:"). position: 0-based row index for insertion. Use -1 to append at the end. values: Dict mapping column identifiers to cell values. Example: {"Name": "Alice", "B": "30", "C:City": "NYC"}

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
valuesYes
versionYes
positionYes
file_pathYes
table_indexYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.6/5.0
Behavior4/5

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

With no annotations provided, the description carries the behavioral disclosure burden and does so well: it states that omitted columns default to empty strings, that success returns only 'v:{new_hash}', and that errors return a structured JSON payload. It also reveals the optimistic-concurrency requirement by requiring the version hash.

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?

The description is front-loaded with the core action, then organized into a clear Args block. Every sentence contributes useful information, and the example values dict is compact but highly informative.

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 five required parameters, no annotations, and no output schema, the description covers all essential invocation details: parameter semantics, return format, error format, and prerequisite calls. An agent has enough information to call this tool correctly and interpret its result.

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 must fully explain parameters, and it does. It defines absolute paths, 0-based indexing, the 12-char hex hash format, the -1 append convention, and gives a rich example of the values dict with three accepted column identifier forms.

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 opens with the specific verb-resource pair 'Insert a new row', which clearly distinguishes the tool from row-mutating siblings like update_cells and delete_row, and from insert_column. The scope is unambiguous: adding a single row to a table.

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 gives concrete context for when to use the tool: it requires a version hash from read_table and a table index from list_tables, establishing a clear workflow dependency. It does not explicitly name alternatives or state when not to use it, but the prerequisites and insertion semantics are sufficiently clear.

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