Skip to main content
Glama

buy_product

Buy a listing from anywhere on the network, settled in USDC on Base, without leaving this connector. Pass the seller_mcp_url and product_id from the listing (mcp_ref). For physical products include the full delivery block; for event passes include the attendee block; the call rejects with the missing fields listed if any are blank. Free passes are not bought here: use claim_pass. Returns an x402 payment requirement and an order_ref, then settle at the absolute /api/x402/purchase endpoint it returns (sign an EIP-2612 USDC permit and POST { order_ref, x_payment }, OR send a raw USDC transfer to payTo and POST { order_ref, payment_tx_hash }). Call get_shipping_quote first and pass buyer_country to include shipping.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
qtyNo
attendeeNoRequired for event passes.
deliveryNoRequired for physical products. Omit for digital / service.
product_idYesThe listing id from discovery (mcp_ref.product_id).
buyer_walletYesThe buyer wallet that will settle in USDC on Base.
buyer_countryNoISO 3166-1 alpha-2 destination country. Required when the seller ships; folds the shipping quote into the total.
selected_sizeNoVariant size, for network-member products that have a size axis (e.g. S, M, L). Ignored by VIA-native listings.
buyer_agent_idNoERC-8004 agent id of the Buying Agent acting on the buyer's behalf.
selected_colorNoVariant colour, for network-member products that have a colour axis. Ignored by VIA-native listings.
seller_mcp_urlYesmcp_ref.seller_mcp_url from a find_seller / get_seller_products result.

Schema Changelog

Changes observed during successful MCP inspections. Dates show when Glama detected each change.

  1. First observed

TDQS

A4.9/5.0
Behavior5/5

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

With no annotations, description fully discloses behavior: returns x402 payment requirement and order_ref, details settlement process (EIP-2612 permit or raw USDC transfer), and mentions rejection with missing fields.

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?

Description is thorough but slightly verbose; however, every sentence adds necessary information and it is front-loaded with main purpose.

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, description compensates by explaining return value and settlement flow, and addresses different product types and prerequisites, making it complete for agent use.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters5/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 90%, but description adds context like source of seller_mcp_url and product_id from mcp_ref, conditionality of delivery/attendee blocks, and requirement for buyer_country with shipping.

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?

Description clearly states 'Buy a listing from anywhere on the network, settled in USDC on Base' with specific verb (buy) and resource (listing), and distinguishes from sibling tool claim_pass for free passes.

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?

Explicitly says when not to use ('Free passes are not bought here: use claim_pass'), provides prerequisite ('Call get_shipping_quote first'), and gives conditional instructions for physical vs event products.

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.

Resources