Skip to main content
Glama
Four02 MCP Server

Four02 MCP Server

by primeality

Buy Product from Merchant

four02_buy_product

Initiates a product purchase from a merchant catalog and returns x402 payment instructions with USDC amount, payment address, and EIP-712 fields for wallet approval.

Instructions

Purchase a product or service from a merchant's catalog. This initiates the x402 payment flow — you'll receive payment instructions including the amount in USDC, the payment address, and the EIP-712 signature fields. Your wallet must have USDC on Base network and have approved the Four02 facilitator.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "merchantId": "<merchantId>",
      "productId": "<productId>"
    },
    "name": "four02_buy_product"
  }
}

Input Schema

NameRequiredDescriptionDefault
notesNoOrder notes (e.g. 'no sugar', 'rush delivery', 'extra hot')
quantityNoQuantity to purchase (default: 1)
productIdYesThe product ID from the catalog
merchantIdYesThe merchant ID

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A3.8/5.0
Behavior4/5

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

With no annotations supplied, the description carries the full burden and does real work: it discloses that the call initiates the x402 payment flow and returns amount in USDC, payment address, and EIP-712 signature fields. It omits whether the purchase finalizes immediately or only after payment settlement, and what happens on insufficient funds or missing approval.

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?

Three short sentences, front-loaded with the action, then the resulting flow, then the prerequisites. No filler and no repetition of the schema.

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 four-parameter, no-annotation, no-output-schema mutation tool, the description explains the response shape and the wallet prerequisites, which is substantial. The remaining gap is settlement behavior — whether the purchase completes on this call or only after the agent signs and pays.

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 each of the four parameters is already documented in the schema. The description adds no further meaning about merchantId, productId, quantity, or notes, so baseline 3 applies.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

States a specific verb and resource: 'Purchase a product or service from a merchant's catalog.' The catalog framing implicitly distinguishes it from four02_browse_catalog and four02_merchant_info, but no sibling is named explicitly.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Prerequisites are clear (wallet must hold USDC on Base and have approved the Four02 facilitator), which helps decide whether the call can succeed. However, there is no explicit when-to-use/when-not guidance and no named alternative for merely browsing or inspecting a merchant.

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