Skip to main content
Glama

x402-credit-balance

Check purchased, used, pending, and available credits for a reusable prepaid key. Uses no payment and consumes no credits.

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": {
      "creditKey": "<creditKey>"
    },
    "name": "x402-credit-balance"
  }
}

Input Schema

NameRequiredDescriptionDefault
creditKeyYesReusable prepaid key returned by x402-credit-purchase

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

B3.4/5.0
Behavior2/5

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

The annotations declare readOnlyHint=false, yet the description asserts a pure status check with no payment and no credit consumption. That is a direct conflict in exactly the safety dimension the annotations are meant to cover, so the agent cannot be sure whether calling it can mutate server-side state (e.g., invalidating or marking a pending entry).

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?

Two short sentences, zero filler, with the scope (which credit states) front-loaded ahead of the cost caveat. Nothing in the text is redundant with the title or 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?

With no output schema, the description usefully enumerates the returned fields (purchased, used, pending, available), which is the main thing an agent needs. It omits error/expiry handling for an invalid key and does not resolve the read-only question raised by the annotations, leaving a small gap for a one-parameter tool.

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 the single creditKey parameter is fully documented as "Reusable prepaid key returned by x402-credit-purchase." The description adds no further parameter meaning (length bounds, format, invalid/expired-key behavior), so the 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?

"Check purchased, used, pending, and available credits for a reusable prepaid key" gives a specific verb and resource and enumerates the four fields returned, so the agent knows exactly what it gets back. It never names the nearest sibling (payment-balance) or states how the two differ, so the differentiation is only implied by the phrase "reusable prepaid key".

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?

"Uses no payment and consumes no credits" is a useful usage signal — the agent can call it freely for status checks before spending. However, there is no explicit when-not guidance and no routing to x402-credit-purchase (the sibling that produces the key) or to payment-balance for non-key balances; the agent must infer the boundary from the sibling names.

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.