Skip to main content
Glama

Many writes, one transaction

apply_data_writes
DestructiveIdempotent

Apply up to 200 add, update, or move writes in one all-or-nothing transaction instead of one call per row; any failure rolls back the batch.

Instructions

Apply up to 200 writes in ONE transaction — for applying many known rows in one go instead of one call per row. Each command is exactly what you would send to data_add_item / data_update_item / data_move_item, as {type, ...args}: type is add_item | update_item | move_item. Deletion is not one of them: a delete needs its own confirmation, which an all-or-nothing batch cannot give per row, so it goes through data_delete_item. All or nothing: the first failure rolls back everything and names which command failed. The reply is one line per command ({id, seq}) — not the rows, which you already have.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
actorNo
commandsYes[{type: "add_item", collection, fields, group?}, {type: "update_item", id, fields}, …] — same arguments as the single-write tools
command_idYesidempotency key — generate a fresh uuid per action

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
okYes
eotNo
seqNothe batch's last ledger position — pass it to data_changes as `since`
noteNo
countNo
reasonNo
resultsNo
failed_indexNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv0.7.2

TDQS

A4.7/5.0
Behavior4/5

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

Annotations already declare destructiveHint=true, idempotentHint=true, and readOnlyHint=false, so the safety profile is covered. The description adds genuine value beyond that: all-or-nothing rollback on first failure, failure attribution naming the offending command, and the one-line-per-command reply shape. It does not mention auth/permission requirements, so it falls short of 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.

Conciseness5/5

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

Front-loaded with purpose and scale limit, then rules, then return shape. Every sentence carries distinct information (scale, mapping, exclusion, transaction semantics, output), with no repetition of the schema or annotations.

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?

For a batch mutation tool with nested command objects and an existing output schema, the description supplies everything an agent needs: batching threshold, command vocabulary, argument provenance, rollback behavior, and error attribution. Return values are additionally summarized despite the output schema, which is a bonus rather than a gap.

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 meaningfully augments it: it defines the {type, ...args} shape of commands, enumerates the three valid type values, and points to the single-write tools as the source of truth for the per-command arguments. The actor parameter is left undocumented in both schema and description, keeping this off a 5.

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?

States a specific verb+resource (apply writes), a hard scale limit (up to 200), and the batching rationale (many known rows in one go instead of one call per row). It explicitly distinguishes itself from the single-row siblings data_add_item / data_update_item / data_move_item by naming them and by naming data_delete_item as the excluded case.

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

Usage Guidelines5/5

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

Gives an explicit when (many known rows in one go), an explicit when-not (deletion is not one of the supported command types), and routes the excluded case to the correct alternative, data_delete_item, with the reason (a batch cannot give per-row confirmation). Nothing is left to inference.

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