Skip to main content
Glama

request_product_purchase_payment

Return the x402 payment challenge (v1 JSON body plus, when the server sends it, the decoded v2 PAYMENT-REQUIRED header as paymentRequired) for purchasing a public product. This wraps the existing public /p/:id-or-slug flow and does not require owner credentials.

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": {
      "productIdOrSlug": "<productIdOrSlug>"
    },
    "name": "request_product_purchase_payment"
  }
}

Input Schema

NameRequiredDescriptionDefault
metadataNoOptional metadata object forwarded to the purchase flow
productIdOrSlugYesProduct slug or product ID used in the public /p/:id-or-slug purchase route
clientReferenceIdNoOptional client reference ID forwarded to the purchase flow

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A3.8/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 reasonably well: it discloses that no owner credentials are needed, that the tool wraps the existing public route, and what the response contains (v1 JSON body plus optional decoded v2 PAYMENT-REQUIRED header as paymentRequired). It stops short of stating that no charge occurs at this step or whether the challenge expires.

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?

Two sentences, front-loaded with the core action and return shape, with the credential/scope note second. The parenthetical about v1/v2 is dense but earns its place as return-value clarification; nothing is wasted.

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?

There is no output schema, so the description must explain the return value, and it does: v1 JSON body plus an optional decoded v2 paymentRequired header. Combined with the auth note and the source route, an agent has enough to call this correctly without ambiguity.

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 coverage is 100%, so the baseline is 3; all three parameters are already documented, including metadata and clientReferenceId as forwarded optional values. The description adds only that productIdOrSlug maps to the public /p/:id-or-slug route, which is minimal additional meaning.

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: returns the x402 payment challenge for purchasing a public product, and clarifies it wraps the public /p/:id-or-slug flow. It is clearly distinguishable from an execution-oriented sibling like purchase_product_with_payment, but it never names that sibling, so an agent must infer the request-vs-complete split.

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?

The description implies this is the challenge-request step ('Return the ... challenge ... for purchasing') and notes no owner credentials are required, which is useful pre-call context. It does not explicitly say when to choose this over purchase_product_with_payment or what to do with the returned challenge next, leaving the workflow 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.

Resources