Skip to main content
Glama

Hash Encoding Direct Credits

Get credit balance

get_credit_balance
Read-onlyIdempotent

Check the remaining prepaid API credits for the bearer token configured on this MCP connection. Use this after redeeming a payment when you need to decide whether a protected tool can be called. The bearer token is read from the Authorization header, not from tool arguments. This call is free, does not spend credits, and does not purchase or redeem credits.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • changedOutput schema / (root)
      Previous value: -nullNew value: +{
      +  "$schema": "https://json-schema.org/draft/2020-12/schema",
      +  "anyOf": [
      +    {
      +      "additionalProperties": false,
      +      "properties": {
      +        "credits": {
      +          "description": "Current number of remaining API credits.",
      +          "maximum": 9007199254740991,
      +          "minimum": 0,
      +          "type": "integer"
      +        }
      +      },
      +      "required": [
      +        "credits"
      +      ],
      +      "type": "object"
      +    },
      +    {
      +      "additionalProperties": false,
      +      "properties": {
      +        "error": {
      +          "description": "Reason the balance could not be returned, such as a missing or invalid bearer token.",
      +          "type": "string"
      +        }
      +      },
      +      "required": [
      +        "error"
      +      ],
      +      "type": "object"
      +    }
      +  ],
      +  "type": "object"
      +}
  2. First observed

TDQS

A4.7/5.0
Behavior5/5

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

Annotations already declare the read-only/idempotent/non-destructive profile, and the description adds non-obvious context on top: the credential is read from the Authorization header rather than tool arguments, and the call is free and never spends, purchases, or redeems credits. That cost/auth behavior is exactly what an agent needs beyond the annotation set.

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 ordered purpose, usage, then constraints. Every sentence carries distinct information with no repetition.

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?

With an output schema present, return values need not be described. The description covers identity source, cost implications, and the decision context for calling it, which is everything needed for a zero-argument read tool.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Zero parameters, so the baseline is 4. The description usefully clarifies that the identity comes from the Authorization header instead of tool arguments, which meaningfully explains why no parameters exist.

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 and resource ('Check the remaining prepaid API credits') and scopes it to the bearer token of this MCP connection. It is unmistakably distinct from the sibling utility tools (base64_encode, hash_sha256, jwt_decode).

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?

Gives an explicit trigger: 'Use this after redeeming a payment when you need to decide whether a protected tool can be called.' That is real when-to-use guidance, though it does not explicitly contrast against get_payment_info or name a when-not condition.

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