Skip to main content
Glama
presidio-v

presidio-hardened-x402-mcp

by presidio-v

check_payment_policy

Check if a payment is allowed by spending policy, recording spend against rolling time-window ledgers. Call before submitting payment to enforce limits.

Instructions

Check whether a payment is allowed by the configured spending policy.

WARNING: this records the spend against rolling time-window ledgers. Call exactly once, immediately before submitting the payment. If you call this and then do not pay, the spend window will be inflated until it rolls over.

Configure limits at server startup via PRESIDIO_X402_MCP_* env vars.

Args: resource_url: x402 resource URL being paid (used for per-endpoint limits). amount_usd: Payment amount in USD-equivalent.

Returns: {"allowed": true} on success, or {"allowed": false, "reason": str, "limit_usd": float, "amount_usd": float}.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
amount_usdYes
resource_urlYes

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Behavior5/5

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

With no annotations provided, the description fully discloses critical behavioral details: it records spend against rolling time-window ledgers and warns that calling without paying inflates the spend window. It also mentions configuration via env vars, leaving no ambiguity about side effects.

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?

The description is well-structured with a clear purpose, a prominent warning, configuration notes, and a parameter/return section. It is efficient but slightly verbose; every sentence adds value. Could be trimmed, but quality is high.

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?

Given the tool's simplicity (two scalar params, no nested objects) and the presence of an output schema (return format described), the description covers purpose, side effects, usage, parameters, and returns comprehensively. No critical information 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 description coverage is 0%, but the description adds meaning: resource_url is 'x402 resource URL being paid (used for per-endpoint limits)' and amount_usd is 'Payment amount in USD-equivalent.' This clarifies usage beyond the parameter names, though format constraints or examples are missing.

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?

The description clearly states the tool's purpose: 'Check whether a payment is allowed by the configured spending policy.' It uses a specific verb ('check') and resource ('payment policy'), and distinguishes from siblings (screen_payment_metadata, check_payment_replay) by its focus on spending limits and side effects.

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 description provides explicit when-to-use guidance: 'Call exactly once, immediately before submitting the payment.' It warns against calling without paying to avoid inflating the spend window. No explicit when-not-to-use or comparison to siblings, but the guidance is clear and actionable.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/presidio-v/presidio-hardened-x402-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server