Skip to main content
Glama

Add or update rows by a key

rows_upsert

Sync rows from anywhere without reading the table first: each row whose key column matches a row in the table updates it (only the columns given change; a null value clears a cell), the rest are added. The key is a text, email, url, phone, select or number column whose values are unique (text matches in any case). Up to 500 rows, checked first: if one is wrong, nothing changes. Costs $0.001 per row added or updated; nothing if none are found.

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": {
      "table": "<table>",
      "key": "<key>",
      "rows": "<rows>"
    },
    "name": "rows_upsert"
  }
}

Input Schema

NameRequiredDescriptionDefault
keyYesThe column that identifies a row, e.g. "Email" or "SKU".
rowsYes
tableYesThe table's name (or its table_id).

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.2/5.0
Behavior5/5

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

Annotations only say readOnly=false, destructive=false, idempotent=false, openWorld=false; the description goes well beyond that by disclosing atomic all-or-nothing validation ('if one is wrong, nothing changes'), partial-update semantics, the null-clears-cell rule, a 500-row cap, and a per-row cost of $0.001 with no charge when nothing matches. These are exactly the operational facts an agent needs before committing a bulk mutation.

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?

One dense paragraph that front-loads the core upsert behavior before limits and pricing. It is efficient, though a couple of sentences (key-type enumeration, cost clause) are packed tightly enough that a reader has to parse carefully.

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?

With no output schema and three parameters, the description covers mutation semantics, key constraints, atomicity, limits, and cost — nearly everything needed to call it safely. It does not say what the call returns (e.g., counts of added vs updated rows), which matters for a bulk upsert.

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?

Schema coverage is 67%, and the description compensates for the undocumented parts of `key`: it lists the admissible column types (text, email, url, phone, select, number), requires uniqueness, and notes case-insensitive matching for text. The 500-row ceiling restates the schema's maxItems, so that part adds nothing new.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description gives a precise verb+resource: it syncs rows, updating rows whose key matches and adding the rest, with the exact update semantics (only supplied columns change, null clears a cell). It never names the adjacent siblings rows_add or rows_update, so an agent must infer the split from the upsert wording rather than being routed explicitly.

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?

It states a clear use context — 'sync rows from anywhere without reading the table first' — which implicitly separates it from read-then-write flows. It stops short of naming alternatives (rows_add for insert-only, rows_update for update-only) or explicit when-not-to-use conditions.

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