Skip to main content
Glama

sheet_upsert

Add or update a row in a schema-validated sheet by key, applying only the fields you pass.

Instructions

Add a row to a sheet, or update the row that is already there. A sheet is a folder the owner marked with a _schema.md file. Fields are checked against that schema, the existing row is located by its key and identity columns, and only the fields you pass are changed. agent is the name recorded on the row; it defaults to this server's ENIGMA_AGENT_NAME.

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": {
      "sheet": "<sheet>",
      "fields": "<fields>"
    },
    "name": "sheet_upsert"
  }
}

Input Schema

NameRequiredDescriptionDefault
bodyNo
agentNo
sheetYes
fieldsYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.3.1

TDQS

A3.7/5.0
Behavior4/5

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

With no annotations supplied, the description carries the full behavioral burden and does substantial work: fields are validated against the sheet's schema, the existing row is matched by key and identity columns, and only passed fields are mutated (partial-update semantics). It omits failure behavior on schema violations, whether the sheet is created when missing, and what is returned, which keeps it below a 5.

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?

Sentences are front-loaded, ordered from purpose to domain definition to mechanics to the one parameter default, and each carries information. Minor slack in phrasing like 'or update the row that is already there' and the parenthetical server-variable detail, but no filler sentences.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a mutation tool with no annotations, no output schema, four parameters at 0% schema coverage, and a free-form nested 'fields' object, the description should also cover the unexplained 'body' parameter, error/validation outcomes, and the shape of the result. It covers identity matching and partial updates well but leaves those areas blank.

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 description coverage is 0%, so the description must compensate, and it explains three of four parameters meaningfully: 'sheet' as a schema-marked folder, 'fields' as schema-checked with only-passed-fields-changed semantics, and 'agent' as the recorded name defaulting to ENIGMA_AGENT_NAME. The 'body' parameter is never mentioned anywhere, which is the remaining gap.

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 specific verb pair and resource: 'Add a row to a sheet, or update the row that is already there,' and even defines what a sheet is (a folder marked with a _schema.md file). It is clearly an upsert on sheet rows, but it never contrasts itself with the sibling upsert_concept, so an agent must infer the boundary.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Usage is implied by the create-or-update semantics and by the schema-validation prerequisite, which tells the agent the target must be a schema-marked sheet. There is no explicit when-not guidance and no named alternative (e.g., when to use upsert_concept versus this), leaving routing to inference.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.