Skip to main content
Glama

AgentPay — trust routing + spend caps for x402 agents

session_create

Open a budget-capped agent session on AgentPay. Pay $0.01 USDC once — get a session_id, budget config, and gateway URL. Enforces a hard max_spend cap across all subsequent tool calls via the AgentPay SDK. The entry point for agents discovering AgentPay on Base Bazaar.

Use when: You want to start an AgentPay session with a hard spend cap and get a session_id for tracking. Not for: you only need a session for free tools — the SDK's quickstart() opens one at no cost; this call settles $0.01 on-chain. Returns: session_id, max_spend, agent_address, gateway_url, tools_endpoint, created_at, receipt (tx_hash + network) Example response: {"session_id":"f47ac10b-58cc-4372-a567-0e02b2c3d479","max_spend":"0.10","agent_address":"GBCVQCNFWPM3GDO4GPT4YEQ42ZHPY67QTJA3WN5ERQIKQDXKBX62SLNJ","label":null,"gateway_url":"https://agentpay.tools","tools_endpoint":"https://agentpay.tools/tools","created_at":"2026-05-27T12:00:00Z","receipt":{"tx_hash":"0xabc...def","network":"base","amount_usdc":"0.01"},"sdk_hint":"Use from agentpay import Session to enforce the max_spend cap client-side."}

Price: $0.01 USDC per call (x402 over MCP: an unpaid call returns PaymentRequired; pay via _meta x402/payment)

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
labelNoOptional human-readable label for this session
max_spendNoHard budget cap in USDC for this session, e.g. '0.10'0.10
agent_addressNoYour wallet address (Stellar G... or EVM 0x...)

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.8/5.0
Behavior5/5

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

Annotations only mark readOnlyHint=false and openWorldHint=true; the description goes well beyond by disclosing the $0.01 USDC charge, the hard max_spend enforcement across all subsequent calls, the on-chain settlement, and the x402 PaymentRequired flow for unpaid calls. This is exactly the behavioral context (cost, auth/payment, error behavior) an agent needs before invoking.

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?

Front-loaded with the core action and cost, then organized into Use when / Not for / Returns / Example sections. It is on the long side and the full example-response JSON is somewhat verbose, but with no output schema each block earns its place.

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?

No output schema exists, so the description must carry the return contract, and it does: it enumerates returned fields and provides a full example response including the receipt and sdk_hint. Combined with the payment/error behavior, an agent has everything needed to call and use this tool correctly.

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 coverage is 100%, so the baseline is 3, but the description adds meaning: max_spend is described as a 'hard max_spend cap across all subsequent tool calls' enforced by the SDK, which is more than the schema's 'Hard budget cap in USDC for this session.' It doesn't add much for label or agent_address beyond what the schema states.

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?

States a specific verb+resource ('Open a budget-capped agent session on AgentPay') with the concrete outputs (session_id, budget config, gateway URL) and positions itself as 'the entry point for agents discovering AgentPay on Base Bazaar.' This is clearly distinguishable from every sibling, none of which create sessions.

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?

Provides explicit 'Use when' and 'Not for' clauses, including the alternative (SDK's quickstart() for cost-free sessions) and the reason to prefer this one (settles $0.01 on-chain). Nothing about tool selection is left to inference.

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.