Skip to main content
Glama
agent-pay-gate
by NariP

Check payment

check_payment

Verifies human payment approval against the exact quote amount; when matched, captures the payment and marks the order paid, with repeat checks never charging twice.

Instructions

Check whether the human approved the payment. If they did and the approved amount matches the quote exactly, the gate captures it and the order becomes PAID. Calling this again never charges twice.

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": {
      "quote_id": "<quote_id>"
    },
    "name": "check_payment"
  }
}

Input Schema

NameRequiredDescriptionDefault
quote_idYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

B3.4/5.0
Behavior3/5

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

With no annotations, the description does meaningful work by revealing that this 'check' actually captures the payment and mutates order state to PAID, plus an explicit idempotency guarantee. However it omits other outcomes (pending, rejected, amount mismatch), what happens on failure, and any permission or auth requirements, so a mutation-capable tool remains only partially disclosed.

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?

Two tight sentences with the core action front-loaded and the safety guarantee (no double charge) following immediately; no filler. Slightly dense phrasing ('the gate captures it') assumes familiarity with the gate concept.

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 one-parameter tool with side effects and no output schema, the description should say what a non-approved or mismatched response looks like; it only covers the success path. The idempotency note is valuable, but the negative outcomes remain unstated.

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?

Only one parameter (quote_id) exists, and the schema describes it at 0% coverage; the description references 'the quote' and the approved amount matching it 'exactly', which lightly implies quote_id identifies the quote being verified. It adds no format, source, or validity detail beyond that implication.

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 specific verb and resource: 'Check whether the human approved the payment,' and adds the downstream consequence (gate captures it, order becomes PAID). This is clearly a status-verification step distinct from request_payment, though it never names or contrasts siblings explicitly.

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?

Usage is implied rather than stated: the agent learns to call it after a payment request and that it can be re-called ('never charges twice'), but there is no guidance on polling cadence, what to do when the answer is 'not approved', or when to prefer another tool.

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