Skip to main content
Glama

correct_transaction

DestructiveIdempotent

Atomically compare and correct declared fields on multiple entities. Supply each loaded observation count and expected fields. Any conflict, denied write or snapshot mismatch rolls back every change.

Instructions

Atomically compare and correct declared fields on multiple entities. Supply each loaded observation count and expected fields. Any conflict, denied write or snapshot mismatch rolls back every change. Retry the identical request and key after uncertainty. This primitive does not authorize application-level approval.

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": {
      "idempotency_key": "<idempotency_key>",
      "entities": "<entities>"
    },
    "name": "correct_transaction"
  }
}

Input Schema

NameRequiredDescriptionDefault
user_idNo
entitiesYes
idempotency_keyYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed3 schema fields changedv0.29.1
    • addedInput schema / properties / entities / items / properties / changes / description
      Added value: +"Empty only for a compare-only participant; at least one other participant must have a correction. A compare-only participant adds no observation or notification."
    • changedInput schema / properties / entities / items / properties / changes / minItems
      Previous value: -1New value: +0
    • changedInput schema / properties / entities / items / properties / expected_snapshot / description
      Previous value: -"Declared expected values; missing differs from null. Observation count guards the whole entity."New value: +"Declared expected values; missing differs from null. A compare-only participant with no changes requires at least one declared expected field. Observation count guards the whole entity."
  2. Addedv0.25.0

TDQS

A3.6/5.0
Behavior4/5

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

Annotations already flag it as a non-read-only, idempotent, destructive write, but the description adds substantive behavior beyond them: all-or-nothing rollback on conflict, denied write, or snapshot mismatch, plus the retry contract for uncertainty and an explicit authority limitation. It stops short of naming permission requirements or the response shape, which keeps it from 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?

Five short, front-loaded sentences with no filler; the atomic compare-and-correct premise leads and the constraints follow. The density of terms like 'declared fields' and 'loaded observation count' is efficient but assumes prior familiarity with the domain vocabulary.

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 destructive, batch, nested-payload mutation with no output schema, the description covers failure semantics and retry well but omits what a successful call returns, how partial compare-only participants behave in the response, and any permission prerequisites. The 'compare-only participant' nuance lives only in the schema, not the description.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is effectively 0% at the top level, so the description must carry meaning, and it does partially: 'loaded observation count' maps to expected_observation_count and 'expected fields' maps to expected_snapshot, and the retry sentence explains the role of idempotency_key. But user_id is never mentioned and the relationship between expected_observation_count and expected_snapshot is left vague, so the compensation is incomplete.

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?

States a concrete compound verb ('compare and correct') against a specific target ('declared fields on multiple entities') and adds the atomicity qualifier. The multi-entity scope implicitly distinguishes it from the singular 'correct' sibling, though that sibling is never named, so the differentiation is inferential 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 Guidelines3/5

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

Gives real operational guidance: supply each loaded observation count and expected fields, and retry the identical request and key after uncertainty. It also sets a scope boundary ('does not authorize application-level approval'). However, it never says when to choose this over 'correct' or any other write path, so the alternative-selection guidance is only implied by the 'multiple entities' wording.

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