Skip to main content
Glama

Commit staged payment batch with dual control

commit_payment_batch

Commit an authorized staged payment batch using dual-control verification, transitioning it from staged to committed and optionally writing the verified ISO 20022 XML to a file.

Instructions

Commit an authorized staged payment batch with dual-control authorization.

Verifies the stage ID and validates the secondary confirmation token
using constant-time cryptographic comparison (preventing timing attacks).
Transitions the order status from 'staged' to 'committed'. Optionally
writes the verified XML payload to the specified destination path.

Args:
    stage_id: Staging identifier from stage_payment_batch.
    confirmation_token: Secondary secret confirmation token.
    output_file_path: Optional path to write the committed XML document.

Returns:
    CommitPaymentBatchResult with commit timestamp and fingerprint,
    or {"error": ...}.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
stage_idYesThe staging identifier returned by stage_payment_batch.
output_file_pathNoOptional local filesystem destination path to write the committed XML document.
confirmation_tokenYesSecondary authorization token required to execute the dual-control commit.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
errorNo
statusNo
stage_idNo
committed_atNo
output_file_pathNo
sha256_fingerprintNo
total_transactionsNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv0.0.72

TDQS

A3.9/5.0
Behavior4/5

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

Annotations already declare readOnlyHint=false, destructiveHint=false, and openWorldHint=true, so the safety profile is partly covered. The description adds genuinely useful behavioral context beyond that: constant-time cryptographic comparison to prevent timing attacks, the concrete state transition from 'staged' to 'committed', and that it writes a file when a path is given. It omits what happens on a second commit (idempotentHint=false), which is a minor gap.

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?

Front-loaded with the core action, then organized into Args and Returns sections. Every sentence carries weight (security mechanism, state transition, optional file write). Slightly verbose for the payload but well structured and free of filler.

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

Completeness4/5

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

Given the tool's complexity, an output schema exists, and annotations cover the safety profile, the description is nearly complete: it covers parameters, the state change, the security mechanism, and an error return. The only meaningful omission is idempotency/re-commit behavior, which matters for a non-idempotent mutation.

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 100%, so the schema already documents all three parameters, including that output_file_path is optional and that stage_id comes from staging. The description restates these without adding syntax, format, or validation detail beyond the schema. Baseline 3 is appropriate when the schema does the heavy lifting.

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 (Commit) and resource (authorized staged payment batch) and qualifies the operation with 'dual-control authorization'. This clearly distinguishes it from the sibling stage_payment_batch, which only stages. An agent can tell the two apart without opening either schema.

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?

The description implies the workflow by noting stage_id comes from stage_payment_batch, giving implicit context that this is the post-staging step. However, it never explicitly says when to use this versus simulate_payment_batch (the simulation sibling) or what preconditions must hold before committing. Guidance is implied rather than stated.

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