Skip to main content
Glama
romudille-bit

AgentPay x402 — Economic-intelligence layer for AI Agents

session_create

Open a budget-capped AgentPay agent session: pay $0.01 USDC once to get a session_id, gateway URL, and a hard max_spend cap enforced across later tool calls.

Instructions

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 — settles on-chain from the wallet in STELLAR_SECRET_KEY (funded mainnet Stellar account required); not read-only. Live public data, no other API key.

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. Addedv0.3.0

TDQS

A4.8/5.0
Behavior5/5

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

Annotations cover the safety profile (readOnlyHint false, openWorldHint true, non-idempotent, non-destructive), and the description still adds substantial context: the $0.01 on-chain settlement, the funded mainnet Stellar account requirement via STELLAR_SECRET_KEY, the hard max_spend enforcement across all downstream calls, and that no other API key is needed.

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?

Well front-loaded with labeled Use when / Not for / Returns sections, but the price-and-network information is stated twice (in the opening and the closing paragraph) and the inline example response is long. Efficient overall, with a small amount of redundancy.

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?

With no output schema, the description carries the return contract itself, enumerating every returned field (session_id, max_spend, agent_address, gateway_url, tools_endpoint, created_at, receipt) plus a concrete example. An agent has everything needed to invoke and consume the call.

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 baseline is 3, but the description adds enforcement meaning to max_spend ('hard max_spend cap across all subsequent tool calls') and clarifies that the call returns the budget config and session_id. It modestly exceeds the schema's own wording.

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') and immediately scopes it with the entry-point role. No sibling among the data tools (token_price, gas_tracker, etc.) overlaps this session-management function, so the agent can discriminate it easily.

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?

Explicit 'Use when' and 'Not for' sections, and the exclusion names the concrete alternative (SDK quickstart() opening a free session) plus the selecting condition (spend cap / on-chain settlement). This is textbook routing guidance.

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