Skip to main content
Glama

Check a proposed spend against limits

trust_check_spend
Read-onlyIdempotent

Compare a proposed spend with a remaining budget, transaction ceiling and merchant allowlist, returning ALLOW/BLOCK with reasons. Budget and ceiling are independent: amount=4, remaining_budget=10, per_transaction_limit=3 returns BLOCK; equality passes. Use one currency/unit, and update remaining_budget in your application after each actual purchase: this tool neither tracks cumulative spending nor converts currencies. Omitting allowed_merchants skips merchant checks; supplying it requires an exact merchant match, and [] blocks all merchants. Use trust_check_action to include evidence or data checks. Enforce BLOCK before paying; this tool never accesses a wallet or executes payment. Free, unauthenticated, stateless pilot: rules apply only to this call. Usage metadata is recorded; request bodies are not stored.

Input Schema

NameRequiredDescriptionDefault
amountYesProposed non-negative amount. Use the same currency/unit as both limits.
merchantNoMerchant identifier; required when allowed_merchants is supplied.
remaining_budgetYesCaller-supplied remaining budget; never read from a wallet or persisted by this service.
allowed_merchantsNoOptional exact, case-sensitive merchant allowlist. An empty list blocks every merchant.
per_transaction_limitNoOptional inclusive maximum amount per transaction.

Output Schema

NameRequiredDescriptionDefault
okYesThe operation completed; does not imply the verdict is ALLOW.
reasonsYesAll failed checks; empty when ALLOW.
serviceYesService that evaluated the request.
verdictYesAdvisory verdict. The integrator must prevent execution on BLOCK or any error.
versionYesDeployed implementation version.
warningYesAdvisory-only payment limitation.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A4.8/5.0
Behavior5/5

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

Annotations cover the safety profile (readOnly, idempotent, non-destructive, closed-world), yet the description adds substantial context beyond them: no wallet access, no payment execution, no cumulative tracking, no currency conversion, free/unauthenticated/stateless with per-call-only rules, and a data-handling note (usage metadata recorded, bodies not stored). This is exactly the kind of disclosure annotations cannot carry.

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?

Dense but front-loaded: the ALLOW/BLOCK contract and the budget/ceiling independence rule come first, with operational caveats after. Nearly every clause carries information, though the passage is long enough that a few points (currency-unit advice) are stated twice across description and schema.

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?

Output schema exists, so return values need not be spelled out, yet the description still names the ALLOW/BLOCK verdict and reasons. Combined with the statelessness warning, the caller-must-update-budget note, and the sibling pointer, an agent has everything needed to call this correctly.

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, but the description adds cross-parameter semantics the schema cannot express: budget and ceiling are independent checks with a worked example (amount=4, budget=10, limit=3 → BLOCK), and equality passes. It also clarifies single-currency/unit usage and the omit-versus-empty distinction for allowed_merchants. Slight overlap with schema text on the empty-list case keeps it from a 5.

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?

Opens with a specific verb+resource ('Compare a proposed spend with a remaining budget, transaction ceiling and merchant allowlist') and states the outcome shape (ALLOW/BLOCK with reasons). It also distinguishes itself from the sibling trust_check_action, so an agent can route 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 Guidelines5/5

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

Explicit routing is given: 'Use trust_check_action to include evidence or data checks,' plus an enforcement instruction ('Enforce BLOCK before paying'). It also states when merchant checks apply versus when they are skipped, and warns that the caller must decrement remaining_budget itself.

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