Skip to main content
Glama

purchase_endpoint_credits_with_payment

Complete a public endpoint credit-pack purchase after you have obtained a valid signed x402 payment (v2 or v1) for the purchase challenge.

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>",
      "paymentPayload": "<paymentPayload>"
    },
    "name": "purchase_endpoint_credits_with_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
paymentPayloadYesSigned x402 payment from the paying client (v2 relayed as PAYMENT-SIGNATURE, v1 as X-Payment), as JSON or base64 string
clientReferenceIdNoOptional client reference ID forwarded to the purchase flow

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • changedInput schema / properties / paymentPayload / description
      Previous value: -"Raw X-Payment payload returned by the paying client, as JSON or base64 string"New value: +"Signed x402 payment from the paying client (v2 relayed as PAYMENT-SIGNATURE, v1 as X-Payment), as JSON or base64 string"
  2. Added

TDQS

A3.5/5.0
Behavior2/5

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

No annotations are supplied, so the description carries the full disclosure burden, and it does not say whether the signed payment is settled or merely consumed on success, whether repeated calls are idempotent, or what happens to the payment if the purchase fails. For a tool that moves money, those omissions are material.

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?

A single front-loaded sentence with the action first and the precondition second; nothing is filler. It could carry one more clause about outcomes without becoming bloated.

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

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

With five parameters including a nested metadata object, no annotations, and no output schema, the definition should say what the call returns (credits applied, receipt, balance) and how failures surface. None of that is present, leaving the agent unable to predict the result of a payment operation.

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 five parameters is already documented, and the description adds only the v2/v1 versioning context. It contributes no additional semantics on ordering, mutual exclusivity, or optional-field behavior beyond the schema.

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?

States a specific verb-plus-resource ('Complete a public endpoint credit-pack purchase') and immediately scopes it to the terminal step of a two-phase flow by requiring a signed x402 payment already in hand. That phrasing separates it from the request_*_payment siblings, which produce the payment challenge, without needing to name them.

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?

The precondition 'after you have obtained a valid signed x402 payment (v2 or v1) for the purchase challenge' is an explicit when-to-use gate that tells the agent not to call this cold. It stops short of naming the upstream tool that issues the challenge or stating what to do if the signed payment is absent or expired.

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