Skip to main content
Glama
Four02 MCP Server

Four02 MCP Server

by primeality

Call Merchant API

four02_call_api

Call a merchant API endpoint through Four02's payment proxy; the first request returns 402 payment instructions, then paid requests are proxied to the merchant's actual API.

Instructions

Call a merchant's API endpoint through Four02's payment proxy. Use this for developer-tier merchants who offer API services (weather data, translation, AI services, etc.). The first call returns payment instructions (402). After paying, the request is proxied to the merchant's actual API and you get the response.

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>",
      "path": "<path>"
    },
    "name": "four02_call_api"
  }
}

Input Schema

NameRequiredDescriptionDefault
bodyNoRequest body as JSON string (for POST/PUT)
pathYesThe API endpoint path (e.g. '/weather/current')
methodNoHTTP method (default: GET)
merchantIdYesThe merchant ID
paymentHeaderNoBase64-encoded X-PAYMENT header with signed EIP-712 payment. Omit on first call to get payment instructions.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4/5.0
Behavior4/5

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

With no annotations, the description carries the full burden and does disclose the non-obvious two-step payment handshake and proxying behavior, which is the key thing an agent must understand. It is silent on failure modes, payment expiry or retry behavior, and any cost or rate constraints.

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 tight sentences, purpose front-loaded, followed by scope and then the payment flow. Nothing is redundant or buried.

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 five-parameter proxy tool with no annotations and no output schema, the description covers purpose, eligibility, and the payment sequence adequately. What the proxied response looks like and how errors or unpaid requests are surfaced are the remaining small gaps.

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 all five parameters including paymentHeader are already documented in the schema. The description's mention of the 402-then-pay flow reinforces when to omit paymentHeader, but adds no syntax or format detail beyond the schema.

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?

The description opens with a specific verb and resource: calling a merchant's API endpoint via Four02's payment proxy, and narrows the audience to developer-tier merchants offering API services such as weather, translation, and AI. That implicitly separates it from catalog/product siblings, though it never names an alternative explicitly.

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

Usage Guidelines4/5

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

It gives a clear selection condition (developer-tier merchants with API services) plus a procedural sequence: first call returns 402 payment instructions, then the request is proxied. It does not say when NOT to use it or when to prefer four02_buy_product for non-API merchants.

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