Add table rows
table_append_rowsAppend up to 1000 typed JSON rows and 16 MiB of row values per call (more is TOO_MANY_ROWS or ROWS_TOO_LARGE: split the write). Returns every row ID; strict table rules apply before row effects. The key (the one unique column) compares exact stored text: '100' and '100.0' differ, the number 1 and the string '1' are one key. Before any row is written: a key value that is an object or array or over 1024 bytes, text holding U+0000 or a lone surrogate, or an upsert row without its key, is INVALID_INPUT; a key repeated within the call, or a plain append of a key a stored row holds, is STATE_CONFLICT. To update stored rows instead, pass upsert: true (the match is on the table's key; a table without one is INVALID_INPUT). A plain append of a stored key is refused atomically, so when several callers add one key, one wins. An upsert overwrites the columns it sends on its match unless the row sends its revision. Add records here rather than rewriting a file: rows are stored once, not copied per change. Send expectedTableRevision (from a rows page, the table read or the last receipt) to refuse the whole call (CONFLICT) if the table changed since; the reply's tableRevision is the next one to send.
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": {
"id": "<id>",
"rows": "<rows>"
},
"name": "table_append_rows"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| id | Yes | The table: its id, alias or page URL. | |
| why | No | Required for workspace items: one sentence on the goal this change serves, not a description of this edit. Every edit to workspace files, rows, folders and settings takes one (task operations need none); sessions and summaries record themselves from it. At most 300 characters. | |
| rows | Yes | At most 1000 rows and 16 MiB of row values (the JSON text of the array of the rows' values) per call, each refused with its own 413 code (TOO_MANY_ROWS, ROWS_TOO_LARGE): split larger writes, carrying expectedTableRevision from each receipt to the next call. Each row is its values by column, or { data, expectedRevision } to refuse the whole call (CONFLICT) if that row changed since or no stored row matches it. | |
| upsert | No | Match each row on the table's key (its one unique: true column) and update the stored row instead of inserting; every row must carry the key. A table without a key refuses NO_TABLE_KEY. | |
| expectedTableRevision | No | Optional: refuse the whole call (CONFLICT, with currentTableRevision) if the table changed since this tableRevision, from a rows page, the table read or the last receipt. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| count | Yes | ||
| rowIds | Yes | ||
| revisions | Yes | ||
| tableRevision | Yes |