Skip to main content
Glama

Edit one row of a data table

edit_data_row
Destructive

Insert, update or delete a single row of a data table without replacing the whole table (move a kanban card, change one status, remove one record). op=insert takes row (a new row, attributed to you; works even when viewer write-back is closed); op=update takes patch (only the named cells change); op=delete removes one row. Which row: for a row viewers appended pass row_id (from list_data_rows, or _row_id in the page readback) — the original submitter is kept and the page readback marks it with _edited: true and _edited_at; for a row of the base table (the one set_data writes) pass base (0-based row index) and revision (the current value from get_data; a stale value is refused with 409 revision_conflict, so call get_data first). Base edits bump the table's revision. Keys that are not columns are ignored and reported in warnings. Text in the change is moderated first: an appended row that hits becomes held (members only), a base row that hits is refused with 422 moderation_hit. Needs editor role or above (viewers get 403 editor_required). Editors can also do this from the page: space.data.insert / update / remove, or POST ./_data//_edit.

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": {
      "proposal_id": "<proposal_id>",
      "table": "<table>",
      "op": "<op>"
    },
    "name": "edit_data_row"
  }
}

Input Schema

NameRequiredDescriptionDefault
opYesinsert 新增一行 · update 改几格 · delete 删一行
rowNoop=insert:新增的一行,键是列名
baseNo底表的行:从 0 数的行号(与 revision 一起传)
patchNoop=update:要改的格,键是列名,值是新的那一格(null 清空)
tableYes表名
row_idNo读者写回的行:list_data_rows 的 row_id 或页面读回的 _row_id
revisionNo按 base 改底表时必传:get_data 返回的当前 revision
proposal_idYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A4.3/5.0
Behavior3/5

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

Annotations already declare destructiveHint=true, readOnlyHint=false and idempotentHint=false, so the safety profile is supplied. The description still adds real behavior the annotations cannot carry: 409 revision_conflict on stale revisions, 422 moderation_hit on base rows, held appended rows for members, 403 editor_required for viewers, and ignored non-column keys surfaced in warnings. It loses a point only because these outcomes are packed into one dense block without a return-value shape.

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

Conciseness3/5

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

Front-loaded correctly, but the body is a single semicolon-chained paragraph mixing op routing, row addressing, moderation, permissions and page-API alternatives. Every fact is useful, yet the lack of structure makes it hard to scan under time pressure.

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?

For an 8-parameter mutation tool with no output schema, the description covers the failure modes an agent must plan for (revision conflict, moderation, role gate) and the readback markers (_edited, _edited_at) that confirm success. Nothing essential to calling it correctly is missing except proposal_id.

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?

Substantially enriches the schema by explaining cross-parameter dependencies: revision is mandatory with base and is the current get_data value, row_id comes from list_data_rows or page readback, and row/patch map to op=insert/update with null clearing a cell. The remaining gap is proposal_id, which has neither a schema description nor mention in the description.

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?

Opens with a precise verb set and resource: "Insert, update or delete a single row of a data table without replacing the whole table." The parenthetical examples (move a kanban card, change one status, remove one record) and the later reference to "the base table (the one set_data writes)" make the boundary against set_data explicit.

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?

Explicitly routes between the two row-addressing modes: row_id for viewer-appended rows (sourced from list_data_rows or `_row_id`) versus base + revision for the base table, with the precondition "call get_data first" spelled out. The op enum is also decomposed with which payload each op requires.

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.

Resources