Skip to main content
Glama
trhonpavel
by trhonpavel

Capture payment

capture_payment
Destructive

Capture an authorized payment for an order, charging the customer. Defaults to the full remaining amount and the only uncaptured payment when amount or payment ID is omitted.

Instructions

Captures an authorized payment (charges the customer). Without 'amount' captures the full remaining amount. Without 'payment_id' uses the only payment that is not fully captured.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
orderYesOrder ID or order number
amountNoMajor units; defaults to the full remaining amount
payment_idNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv0.3.0

TDQS

A4.2/5.0
Behavior4/5

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

Annotations already declare destructiveHint=true, idempotentHint=false, and readOnlyHint=false, so the safety profile is covered. The description adds genuine value by disclosing the money-moving effect and the two implicit-resolution rules (full remaining amount; sole uncaptured payment), which are not visible in the schema.

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?

Two short sentences, effect stated first, default-resolution rules second. No filler; every clause carries information.

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?

For a three-parameter mutation with no output schema, the description covers the action, its preconditions, and the optional-argument behavior. It could say more about partial captures or error conditions (e.g., over-capture, non-idempotency consequences), but nothing essential for invocation 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 67% and payment_id has no schema description, so the description compensates by explaining the 'only payment not fully captured' fallback; it also restates the amount default. It does not clarify accepted formats for order (ID vs number) beyond the schema, but overall adds real meaning.

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 and resource ('Captures an authorized payment') and clarifies the effect in plain terms ('charges the customer'), which cleanly separates it from sibling refund_payment and mark_order_paid. An agent can identify the operation without opening the 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 phrase 'authorized payment' implies the precondition that a prior authorization must exist, and the fallback clauses describe behavior when optional args are omitted. However, there is no explicit statement of when to prefer this over refund_payment/cancel_order or what happens if the payment is not authorized.

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