Build tool-credit payment requirements
commerce.credits_requirementsBuild x402 payment requirements for buying a pack of per-use MCP tool credits, optionally tied to an agent, then pay those terms and complete the purchase with the signature.
Instructions
Build x402 payment requirements to buy a pack of per-use MCP tool credits. Next: pay those terms, then commerce.purchase_credits with the signature.
Tool call template
This tool declares no required parameters. Add optional parameters from the input schema as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {},
"name": "commerce.credits_requirements"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| credits | No | Credit pack size to buy. Example: 100. Omit to use the server default pack. | |
| agent_id | No | Optional agent identity the credits will attach to. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |