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.
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": {
"resource_id": "<resource_id>",
"amount_microunits": "<amount_microunits>"
},
"name": "generate_mpp_challenge"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| resource_id | Yes | Logical resource identifier (e.g. "premium-kb"). | |
| amount_microunits | Yes | Amount in asset micro-units (1 USDC = 1_000_000). | |
| networks | No | Networks to accept. Defaults to ["algorand_mainnet"] if omitted. | |
| expires_in_seconds | No | Challenge TTL; default 300. |