Edit one row of a data table
edit_data_rowInsert, 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
| Name | Required | Description | Default |
|---|---|---|---|
| op | Yes | insert 新增一行 · update 改几格 · delete 删一行 | |
| row | No | op=insert:新增的一行,键是列名 | |
| base | No | 底表的行:从 0 数的行号(与 revision 一起传) | |
| patch | No | op=update:要改的格,键是列名,值是新的那一格(null 清空) | |
| table | Yes | 表名 | |
| row_id | No | 读者写回的行:list_data_rows 的 row_id 或页面读回的 _row_id | |
| revision | No | 按 base 改底表时必传:get_data 返回的当前 revision | |
| proposal_id | Yes |