Skip to main content
Glama

Check an AI agent's payment against the mandate and the instruction

agent_payment_check
Read-onlyIdempotent

When the user asks for a payment check, checks a proposed AI-agent payment against the person's mandate (who allowed it, limits per payment and per period, allowed shops and UPI IDs, end date) and against what the person actually asked for (items, quantities, budget, shop). It works the total out again from the cart lines, and flags lookalike payees, extra items, too much quantity, going over a limit and repeat payments. Returns every check and a receipt signed by Nityaflow. It never pays, holds or moves money: a licensed bank or payment app does that, only after a person approves.

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": {
      "mandate": "<mandate>",
      "intent": "<intent>",
      "action": "<action>"
    },
    "name": "agent_payment_check"
  }
}

Input Schema

NameRequiredDescriptionDefault
actionYesThe payment the agent proposes: {merchant, vpa, lines: [{name, qty, unit, price}], fees, total}.
intentYesWhat the person asked for: {text, items: [{name, qty, unit}], budget, merchant}. Units: kg, g, l, ml, pc, pack, dozen.
historyNoEarlier payments under this mandate: [{at, total, vpa, status: paid}]. Used for the period limit and repeat check.
mandateYesThe permission: {authorised_by, purpose, per_payment, per_period, period (day, week, month or 90 days), merchants: [{name, vpa, category}], approve_above, valid_from, valid_to}.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.6/5.0
Behavior5/5

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

Beyond the readOnly/idempotent annotations it discloses substantive behavior: it recomputes the total from cart lines rather than trusting the proposed total, runs the listed fraud and limit checks, returns a signed receipt, and explicitly disclaims any money movement. That is exactly the extra context annotations cannot convey.

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?

It is front-loaded with the trigger and the core action, then the check list, then the return value and the safety boundary. It is on the long side and the check enumeration could be tightened, but every clause carries information.

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?

With no output schema and nested object parameters, the description steps in to state what comes back ('every check and a receipt signed by Nityaflow') and what the tool will not do, leaving no material question about correct invocation.

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 100%, so the baseline is 3, and the description pushes past it by explaining what each object is used for in practice — mandate fields for the limit and end-date checks, history for the period and repeat checks, and cart lines as the source of the recomputed total.

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?

It names a specific verb and resource: checking a proposed AI-agent payment against the mandate and the instruction, and it lists the concrete facets it validates (limits, merchants, UPI IDs, dates, items, quantities, budget). Nothing in the sibling set overlaps, so an agent can route here unambiguously.

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

Usage Guidelines4/5

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

The opening trigger ('When the user asks for a payment check') and the closing boundary ('never pays, holds or moves money') make the when and when-not clear. It does not name a sibling alternative, but none of the siblings are close substitutes, so the gap is minor.

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.

Resources