Skip to main content
Glama

Edit a document table by row/column

doc_edit_table
Destructive

Modify a document or task-page table by rows, columns, cells, sorting, and column types without editing raw Markdown. Read the table first, then apply one table write action.

Instructions

Change one table in a doc or task page by rows and columns, never its raw Markdown. Use it for tables instead of doc_edit; read it first via workspace_read(view="table"). Returns its columns, rows, cells breaking a column type, and new print.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "doc": "<doc>",
      "action": "<action>"
    },
    "name": "doc_edit_table"
  }
}

Input Schema

NameRequiredDescriptionDefault
docYesDocument ID or task-page filename
rowNoFor `set`/`remove_row`: 1-based row number or first-cell text
downNoFor `sort`: true sorts descending
typeNoFor `set_type`/`add_column`: type syntax e.g. `number`, `money USD sum`, `date`, `check`
tableNo1-based table index or heading above it (omit if single table)
titleNoFor `rename_column`/`add_column`: column title
valueNoFor `set`: cell value ("" clears)
actionYesTable write operation
columnNo1-based index or header (`set`, `sort` and column actions)
valuesNoFor `add_row`: map of column title to cell value
keep_compactionNoConfirm keeping prior compaction on user request

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changedv1.52.0
    • changedInput schema / properties / column / description
      Previous value: -"For `set`/`sort`/`set_type`/`rename_column`/`remove_column`: 1-based index or header"New value: +"1-based index or header (`set`, `sort` and column actions)"
  2. Added

TDQS

A4.4/5.0
Behavior4/5

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

Annotations declare destructiveHint=true, readOnlyHint=false and non-idempotent, so safety posture is already covered; the description still adds value by implying whole-page Markdown is not rewritten and by disclosing that a `set_type` can leave cells breaking a column type. It does not explain the unfamiliar `keep_compaction` confirmation or what happens to data in dropped columns/rows, which is the main remaining gap for a destructive tool.

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?

Three tight sentences, front-loaded with the action and scope, followed by routing and return information. Every clause carries information; nothing is redundant with the title.

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 11-parameter, 8-action mutation tool with no output schema, the description supplies the essential routing, the prerequisite read step, and a partial sketch of the return value (columns, rows, cells breaking a column type, new `print`). It is not fully complete: the `keep_compaction` confirmation and the destructive semantics of row/column removal are left to the annotations and schema.

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 coverage is 100% and the schema already carries per-parameter routing notes (e.g. 'For `set`/`remove_row`', 'For `sort`: true sorts descending'). The description adds no meaning beyond that — it mentions no parameter other than the `view="table"` argument of the sibling read tool — so the baseline 3 applies.

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 (change/edit) and resource (one table in a doc or task page), plus an explicit scope boundary: rows and columns, 'never its raw Markdown'. It also names the sibling it replaces (`doc_edit`), so an agent can distinguish it from the generic document editor without opening either schema.

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

Usage Guidelines5/5

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

Gives both an explicit alternative ('Use it for tables instead of `doc_edit`') and a prerequisite ordering ('read it first via `workspace_read(view="table")`'). The exclusion of raw Markdown editing closes the main misuse path an agent would otherwise take.

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