Skip to main content
Glama

generate_ap2_mandate

Create AP2 payment mandates for agent-to-agent transactions, generating the mandate object and base64 encoding required for payment headers.

Instructions

Generate an AP2 v0.1 PaymentMandate for agent-to-agent payment. Returns the mandate object and its base64 encoding for the AP2-Payment-Required header. After the paying agent submits on-chain, call verify_ap2_payment to confirm.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
resource_idYesLogical resource or task identifier.
amount_microunitsYesAmount in asset micro-units (1 USDC = 1_000_000).
networkNoNetwork to accept. Defaults to algorand_mainnet.
expires_in_secondsNoMandate TTL in seconds; default 300.
descriptionNoOptional description of the resource or task.
Behavior4/5

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

With no annotations provided, the description carries the full burden of behavioral disclosure. It does well by explaining what the tool returns ('mandate object and its base64 encoding for the AP2-Payment-Required header') and the subsequent workflow. However, it doesn't mention potential errors, rate limits, or authentication requirements, which would be helpful for a payment-related tool.

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 perfectly concise with just two sentences that each earn their place. The first sentence explains the core functionality and return values, while the second provides crucial workflow guidance. No wasted words.

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?

For a payment mandate generation tool with no annotations and no output schema, the description does well by explaining the return format and workflow. However, it could benefit from mentioning error conditions or what happens if parameters are invalid, especially given the financial context.

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 already fully documents all 5 parameters. The description doesn't add any additional parameter semantics beyond what's in the schema. This meets the baseline expectation when the schema does the heavy lifting.

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 AP2 v0.1 PaymentMandate'), the resource ('for agent-to-agent payment'), and distinguishes from siblings by mentioning 'verify_ap2_payment' as a follow-up action. It provides a complete picture of what the tool does beyond just the name.

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?

The description explicitly states when to use this tool ('for agent-to-agent payment') and when to use an alternative ('After the paying agent submits on-chain, call verify_ap2_payment to confirm'). It provides clear sequencing guidance that helps the agent understand the workflow.

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