Skip to main content
Glama

Add table rows

table_append_rows
Destructive

Append 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

NameRequiredDescriptionDefault
idYesThe table: its id, alias or page URL.
whyNoRequired 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.
rowsYesAt 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.
upsertNoMatch 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.
expectedTableRevisionNoOptional: 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

NameRequiredDescriptionDefault
countYes
rowIdsYes
revisionsYes
tableRevisionYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • changedInput schema / properties / why / description
      Previous value: -"Required for workspace items: one sentence on what the person is trying to accomplish, in their terms, not a description of this edit. Every workspace write takes one; sessions and summaries record themselves from it. At most 300 characters."New value: +"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."
  2. Changed5 schema fields changed
    • addedInput schema / properties / expectedTableRevision
      Added value: +{
      +  "description": "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.",
      +  "exclusiveMinimum": 0,
      +  "maximum": 9007199254740991,
      +  "type": "integer"
      +}
    • removedInput schema / properties / expectedWorkspaceRevision
      Removed value: -{
      -  "description": "Optional: refuse (CONFLICT) a write that widens the schema if the table changed since this workspaceRevision.",
      -  "exclusiveMinimum": 0,
      -  "maximum": 9007199254740991,
      -  "type": "integer"
      -}
    • changedInput schema / properties / rows / description
      Previous value: -"At most 1000 rows: each its values by column, or { data, expectedRevision } to refuse the whole call (CONFLICT) if that row changed since or no stored row matches it."New value: +"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."
    • addedOutput schema / properties / tableRevision
      Added value: +{
      +  "exclusiveMinimum": 0,
      +  "maximum": 9007199254740991,
      +  "type": "integer"
      +}
    • changedOutput schema / required
      Previous value: -[
      -  "rowIds",
      -  "revisions",
      -  "count"
      -]New value: +[
      +  "rowIds",
      +  "revisions",
      +  "count",
      +  "tableRevision"
      +]
  3. Changed3 schema fields changed
    • removedInput schema / properties / artifactId
      Removed value: -{
      -  "description": "The table: its id, alias or page URL.",
      -  "maxLength": 300,
      -  "minLength": 1,
      -  "type": "string"
      -}
    • addedInput schema / properties / id
      Added value: +{
      +  "description": "The table: its id, alias or page URL.",
      +  "maxLength": 300,
      +  "minLength": 1,
      +  "type": "string"
      +}
    • changedInput schema / required
      Previous value: -[
      -  "artifactId",
      -  "rows"
      -]New value: +[
      +  "id",
      +  "rows"
      +]
  4. Changed1 schema field changed
    • changedInput schema / properties / rows / description
      Previous value: -"At most 1000 rows: each its values by column, or { data, expectedRevision } to refuse (CONFLICT) an upsert match that changed since."New value: +"At most 1000 rows: each its values by column, or { data, expectedRevision } to refuse the whole call (CONFLICT) if that row changed since or no stored row matches it."
  5. First observed

TDQS

A4.7/5.0
Behavior5/5

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

Annotations already flag destructive/non-idempotent, and the description goes well beyond them: atomic refusal of duplicate appends so 'one wins', error codes (INVALID_INPUT, STATE_CONFLICT, CONFLICT, TOO_MANY_ROWS, ROWS_TOO_LARGE), and the overwrite behavior of upsert unless the row sends its revision. That is real operational context an agent cannot get from the annotations.

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

Conciseness4/5

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

Front-loads the hard limits and stays information-dense, but the middle is a run-on chain of parenthetical error conditions and the row/size limits are restated rather than stated once. Efficient for its density, yet tighter grouping of error cases would improve scanability.

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?

Covers the full call lifecycle — limits, validation rules, conflict semantics, revision-based concurrency, and what comes back ('Returns every row ID', 'the reply's tableRevision is the next one to send') — and an output schema exists to carry full return detail. Nothing needed to call it correctly is missing.

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?

Although schema coverage is 100%, the description adds semantics absent from the schema: key matching compares exact stored text ('100' vs '100.0' differ; number 1 and string '1' are one key), upsert matches on the table's unique key, and expectedTableRevision should come from a rows page/table read/last receipt with the reply's tableRevision as the next value.

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 specific verb and resource plus hard scope ('Append up to 1000 typed JSON rows and 16 MiB of row values per call'), and clarifies the append-vs-upsert distinction so an agent knows exactly which mode it is invoking.

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?

Gives explicit routing: use upsert: true to update stored rows, 'Add records here rather than rewriting a file', and when to send expectedTableRevision. It does not name sibling tools like table_update_row or table_delete_rows as alternatives, so selection against the broader catalog is left implicit.

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.