Skip to main content
Glama

request_endpoint_credit_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 credit pack from an endpoint that exposes /e/:slug?action=purchase.

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": {
      "slug": "<slug>"
    },
    "name": "request_endpoint_credit_purchase_payment"
  }
}

Input Schema

NameRequiredDescriptionDefault
slugYesEndpoint slug for the credit-enabled endpoint
metadataNoOptional metadata object forwarded to the purchase flow
walletAddressNoOptional wallet address to receive the purchased credits when the underlying endpoint supports it
clientReferenceIdNoOptional client reference ID forwarded to the purchase flow

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

B3.2/5.0
Behavior2/5

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

With no annotations, the description carries the full behavioral burden, and it only partially discharges it. It discloses the shape of the response (v1 JSON body plus decoded v2 PAYMENT-REQUIRED header as paymentRequired), which usefully implies no charge occurs here. However, it says nothing about auth requirements, whether a wallet must be configured, challenge expiry, error behavior when the endpoint is not credit-enabled, or whether calling it has side effects.

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?

It is a single front-loaded sentence with the verb and output first, followed by the scoping constraint; nothing is redundant. The nested parenthetical about v1/v2 payloads is dense but each clause carries information the agent needs about the return shape.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/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's partial description of the returned challenge is genuinely valuable. Still, for a four-parameter tool with a nested metadata object, no annotations, and a payment-related flow, it leaves gaps: no next-step guidance for using the returned challenge, and no statement of prerequisites or failure conditions.

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% and all four parameters carry their own descriptions, so the baseline is 3. The description reinforces what slug means (the endpoint that exposes /e/:slug?action=purchase) but adds no meaning for metadata, walletAddress, or clientReferenceId beyond what the schema already states, including the nested metadata object.

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 names a specific verb and output ("Return the x402 payment challenge") and scopes the resource precisely to "purchasing a public credit pack from an endpoint that exposes /e/:slug?action=purchase." An agent can distinguish this from a completing-purchase tool because the verb is 'return the challenge,' not 'purchase.' It stops short of explicitly naming the sibling it precedes, so sibling differentiation is implied rather than stated.

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?

Usage is only implied: the word "challenge" signals this is the pre-payment step before an actual purchase, and the endpoint-pattern constraint scopes applicability. There is no explicit when-to-use/when-not statement, no named alternative such as purchase_endpoint_credits_with_payment, and no stated prerequisite (e.g., call this first, then submit payment).

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