Skip to main content
Glama

Upsert Row

upsert_row

Create a row in a v2 app's collection, or return the existing row when key is already present (deduped:true). Row creation goes through this tool; there is no separate strict-create verb. Omit key to add a new row with a server-generated key, or pass key to ensure a row exists at that key. Passing key is also what makes a retry safe: a call unsure whether it already landed can repeat it and get the same row back rather than a duplicate. Without key, a retry mints a second row with its own server-generated key, since there is nothing to dedup against. The collection must be declared in the app's manifest with 'agent' in its write list, which is the list that gates creates. When key matches a row the collection's read list does not reach for this caller, the result is row_not_found rather than the row, matching what get_row would return, so this never reads past read. Returns { row, deduped? }.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
keyNoOptional stable key. Reusing an existing key returns the existing row (deduped:true), or row_not_found when the collection's read list does not reach that row for the caller.
dataYesThe row body - any JSON value valid against the collection's row schema (an object, or any JSON value for a schemaless collection).
app_idYesThe app id.
collectionYesThe collection name.

TDQS

A4.7/5.0
Behavior5/5

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

The description discloses far more than annotations: retry semantics with key dedup, duplicate creation without key, manifest write-list gating, read-list restrictions causing row_not_found, and the return shape. Since annotations only provide generic hints (readOnlyHint false, idempotentHint false), this description carries the full behavioral burden and does so excellently.

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

Conciseness5/5

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

The description is long but every sentence contributes valuable information: core behavior, key semantics, retry behavior, permissions, access-control edge cases, and return shape. It is front-loaded with the main action and no sentence is filler. The structure is logical and appropriately sized for the tool's complexity.

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?

Despite no output schema and sparse annotations, the description covers all essential context: the dedup behavior, key-based retry safety, prerequisites (manifest write list), access-control consequences, and return payload. It also mentions edge cases like row_not_found. This is complete for an upsert tool with subtle permission and idempotency considerations.

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?

The schema already describes all four parameters with 100% coverage, so the baseline is 3. The description adds meaningful context beyond schema definitions, especially for `key`: it explains that omitting it creates a server-generated key and that retrying with an omitted key produces a duplicate. This extra guidance justifies a score above baseline.

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?

The description opens with a precise action: 'Create a row in a v2 app's collection, or return the existing row when `key` is already present (deduped:true).' It clearly identifies the resource (v2 app collection), the verb (create/upsert), and differentiates from siblings like get_row and update_row by noting there is no separate strict-create verb. This is a specific and unambiguous statement of purpose.

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?

The description provides strong guidance on when to use it: omit `key` for a new row with a server-generated key, or pass `key` to ensure existence and make retries safe. It also explains access-control preconditions (manifest write list) and read-list behavior. However, it does not explicitly contrast with sibling tools such as 'use get_row for reads' or 'use update_row for modifications,' so it falls just short of full alternative differentiation.

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.

TDQS

A4.4/5.0
Disambiguation5/5

Each tool targets a distinct resource or action: row operations (get/list/upsert/update/delete/restore) are clearly separated, while apps, attachments, community, grants, ingest, members, publisher, review, and taste each cover a different domain. Even closely related actions like share_link_rotate and domain_set have clearly scoped descriptions, so an agent can reliably select the right tool.

Naming Consistency4/5

Tool names use two patterns: noun-like names for resource areas (apps, attachments, community, grants, ingest, members) and verb_noun names for row operations (upsert_row, delete_row, etc.). This deviation is predictable and readable, but it is not perfectly uniform, so a slight deduction applies.

Tool Count4/5

With 22 tools, the server is on the heavier side, but the breadth of the platform (app lifecycle, data storage, attachments, community, reviews, feedback, identity) justifies the count. Each tool represents a meaningful feature area with multiple internal actions, so none feels redundant.

Completeness5/5

The tool surface covers the full lifecycle for apps (create, read, update, delete), rows (create, read, update, delete, restore, list deleted), attachments, membership, grants, ingest, community, and reviews. Obvious gaps like rollback or version history are not core to the domain, and the presence of get_skill helps agents understand the workflow.

Resources