Skip to main content
Glama

Patch an item's data

patch_item_data
Destructive

Apply JSON Patch (RFC 6902) operations to an item's data, or to the value at pointer (operation paths are then relative to it). Best for surgical edits: replacing an array element, removing a field, appending with path "/list/-". All operations apply, or none. Operations that write over a guarded value (or one of its parents) are refused unless overwriteGuarded is set, and the API refuses test, copy and move from guarded values. Pass the etag you read as ifMatch. 1 request.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
itemYesThe item: its id or alias value (a deleted item only by id)
listYesThe list: its id or pathName
ifMatchNoThe etag you read the item with. The write only happens if nobody has changed the item since; otherwise it fails with ITEM_PRECONDITION_FAILED and nothing is written. Pass it whenever the write is based on something you read
pointerNoA JSON pointer (RFC 6901) into the item's data, e.g. /address/city or /scores/0. Leave out for the whole data
operationsYesThe operations, e.g. [{ "op": "replace", "path": "/status", "value": "done" }]
returnDataNoReturn the item's data after the write (default: metadata only)
overwriteGuardedNoWrite even though it replaces values hidden by guard indexes, deleting them. Only if the user means to

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
etagYes
itemYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.3/5.0
Behavior5/5

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

Goes well beyond the annotations (destructiveHint, idempotentHint) by disclosing atomicity ("All operations apply, or none"), the guarded-value refusal rules including which operations are rejected, and the concurrency contract via ifMatch/ITEM_PRECONDITION_FAILED. These are exactly the behavioral facts an agent cannot recover from annotations or schema.

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?

Dense but front-loaded: purpose, then examples, then atomicity and guard/etag rules. Every sentence carries information, though the guarded-value sentence is clause-heavy and takes a second read.

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?

With a full output schema, complete parameter descriptions, and annotations covering the safety profile, the description supplies the remaining essentials: PATCH semantics, atomicity, guard behavior, and optimistic concurrency. Nothing an agent needs to call this correctly is missing.

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 100%, so the baseline is 3, but the description adds real meaning: relative path resolution when pointer is set, "Pass the etag you read as ifMatch", and the caution on overwriteGuarded ("Only if the user means to"). It does not explain returnData's interaction with output, but the added semantics exceed the schema alone.

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 states a specific verb and resource (apply JSON Patch operations to an item's data) and pins down the operation model by citing RFC 6902 and giving concrete examples. It implicitly distinguishes itself from whole-document siblings like replace_item_data, but never names the sibling actually used for a full overwrite, so routing is inferred rather than explicit.

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?

"Best for surgical edits: replacing an array element, removing a field, appending with path '/list/-'" gives a clear when-to-use signal, and the guarded-value paragraph adds when-not (writes over guarded values are refused). No alternative tool is named, so the agent must still infer that a full replacement belongs to replace_item_data.

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