Skip to main content
Glama

generate_mpp_challenge

Generate IETF MPP 402 payment challenges to gate API resources, specifying amount, networks, and expiration for crypto payment requirements.

Instructions

Generate an IETF MPP (draft-ryan-httpauth-payment) 402 challenge that an API server can return to gate a resource. Produces the WWW-Authenticate and X-Payment-Required headers plus the challenge_id to echo.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
resource_idYesLogical resource identifier (e.g. "premium-kb").
amount_microunitsYesAmount in asset micro-units (1 USDC = 1_000_000).
networksNoNetworks to accept. Defaults to ["algorand_mainnet"] if omitted.
expires_in_secondsNoChallenge TTL; default 300.
Behavior3/5

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

With no annotations provided, the description carries the full burden. It discloses the output ('WWW-Authenticate and X-Payment-Required headers plus the challenge_id') and the tool's role in payment gating, but lacks details on error handling, rate limits, or authentication requirements, leaving behavioral gaps.

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?

The description is a single, well-structured sentence that efficiently conveys the tool's purpose and outputs without unnecessary details, making it easy to understand at a glance.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the complexity of payment challenges and no output schema, the description adequately covers the tool's function and outputs. However, it could be more complete by including information on error cases or the format of the generated challenge, though it's sufficient for basic use.

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 description coverage is 100%, so the schema fully documents all parameters. The description does not add any additional meaning beyond the schema, such as explaining parameter interactions or usage examples, meeting the baseline for high coverage.

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 specific action ('Generate an IETF MPP...402 challenge') and the resource ('that an API server can return to gate a resource'), distinguishing it from siblings like 'generate_ap2_mandate' or 'generate_x402_challenge' by specifying the exact protocol and output headers.

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 clear context for when to use this tool ('to gate a resource'), but does not explicitly mention when not to use it or name alternatives among siblings, such as 'generate_x402_challenge', which might serve a similar purpose.

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/chopmob-cloud/AlgoVoi-Platform-Adapters'

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