Skip to main content
Glama

Nityaflow

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

agent_payment_check
Read-onlyIdempotent

Before an AI agent pays, checks the proposed 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.

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.5/5.0
Behavior5/5

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

Goes well beyond the annotations: discloses that it recomputes the total from cart lines, lists the specific fraud/overspend checks, states the return payload (all checks plus a signed receipt), and asserts it never pays, holds or moves money. The 'never pays' claim is consistent with readOnlyHint=true and idempotentHint=true, and the human-approval step adds important operational context.

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?

Three sentences, front-loaded with the trigger and the check list, followed by the return value and the safety boundary. No filler; the 'it never pays' sentence is essential rather than redundant.

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?

There is no output schema, and the description compensates by naming what comes back (every check plus a signed receipt). Combined with the fully documented four-parameter schema and the read-only annotations, an agent has everything needed to call this correctly and interpret the result.

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 coverage is 100% with nested objects fully documented, so the schema carries the parameter burden. The description reinforces what the mandate contains (limits, allowed shops/UPI IDs, end date) and what intent contains (items, quantities, budget, shop), but adds no format or validation detail the schema doesn't already have. Baseline 3 is appropriate.

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 precise verb and resource: checks a proposed agent payment against the mandate and the user's instruction, and explicitly separates itself from anything that moves money. The enumerated check categories (lookalike payees, extra items, quantity, limits, repeats) make the scope unmistakable.

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?

Opens with the trigger condition, 'Before an AI agent pays,' which tells the agent exactly when to call it, and clarifies that a licensed payment app performs the actual payment. It doesn't name an alternative tool or exclusion, but the sibling tools are unrelated domains so no routing ambiguity exists.

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