Skip to main content
Glama

Get prepaid balance

get_balance
Read-onlyIdempotent

The prepaid balance and last 20 ledger entries of the key in the request’s Authorization: Bearer or X-DiffiCat-Key header; a human obtains one on the account page (/account), which a refusal’s nextSteps name. A Pro key also returns allowance (included pages shared with the web app, used, reset time) and overage (amount this period, cap). Each entry names its surface, web or api. Without a key, answers the remaining free allowance for your address. Free.

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {},
    "name": "get_balance"
  }
}

Input Schema

NameRequiredDescriptionDefault

No arguments

Output Schema

NameRequiredDescriptionDefault
codeNo
freeNo
errorNo
keyIdNo
recentNo
balanceNo
overageNo
currencyNo
allowanceNo
nextStepsNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changed
    • addedOutput schema / properties / free
      Added value: +{
      +  "additionalProperties": {},
      +  "propertyNames": {
      +    "type": "string"
      +  },
      +  "type": "object"
      +}
    • addedOutput schema / properties / nextSteps
      Added value: +{
      +  "additionalProperties": {},
      +  "propertyNames": {
      +    "type": "string"
      +  },
      +  "type": "object"
      +}
  2. Changed1 schema field changed
    • changedOutput schema / $schema
      Previous value: -"http://json-schema.org/draft-07/schema#"New value: +"https://json-schema.org/draft/2020-12/schema"
  3. Changed1 schema field changed
    • addedOutput schema / properties / recent / items / properties / surface
      Added value: +{
      +  "enum": [
      +    "web",
      +    "api"
      +  ],
      +  "type": "string"
      +}
  4. Changed2 schema fields changed
    • addedOutput schema / properties / allowance
      Added value: +{
      +  "additionalProperties": false,
      +  "properties": {
      +    "includedPages": {
      +      "type": "number"
      +    },
      +    "pagesUsed": {
      +      "type": "number"
      +    },
      +    "resetsAt": {
      +      "type": "string"
      +    }
      +  },
      +  "required": [
      +    "includedPages",
      +    "pagesUsed",
      +    "resetsAt"
      +  ],
      +  "type": "object"
      +}
    • addedOutput schema / properties / overage
      Added value: +{
      +  "additionalProperties": false,
      +  "properties": {
      +    "amount": {
      +      "type": "string"
      +    },
      +    "capUsd": {
      +      "type": "string"
      +    }
      +  },
      +  "required": [
      +    "amount",
      +    "capUsd"
      +  ],
      +  "type": "object"
      +}
  5. Changed1 schema field changed
    • changedOutput schema / (root)
      Previous value: -nullNew value: +{
      +  "$schema": "http://json-schema.org/draft-07/schema#",
      +  "additionalProperties": false,
      +  "properties": {
      +    "balance": {
      +      "type": "string"
      +    },
      +    "code": {
      +      "type": "string"
      +    },
      +    "currency": {
      +      "const": "USD",
      +      "type": "string"
      +    },
      +    "error": {
      +      "type": "string"
      +    },
      +    "keyId": {
      +      "type": "string"
      +    },
      +    "recent": {
      +      "items": {
      +        "additionalProperties": false,
      +        "properties": {
      +          "amount": {
      +            "type": "string"
      +          },
      +          "at": {
      +            "type": "string"
      +          },
      +          "jobId": {
      +            "type": "string"
      +          },
      +          "kind": {
      +            "type": "string"
      +          },
      +          "type": {
      +            "type": "string"
      +          }
      +        },
      +        "required": [
      +          "at",
      +          "type",
      +          "amount"
      +        ],
      +        "type": "object"
      +      },
      +      "type": "array"
      +    }
      +  },
      +  "type": "object"
      +}
  6. Added

TDQS

A4.6/5.0
Behavior5/5

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

Beyond the read-only and idempotent annotations, the description discloses meaningful behavior: it returns the last 20 ledger entries, includes Pro allowance and overage details, labels each entry by surface, and handles keyless calls by returning the remaining free allowance. It also mentions the auth headers and account-page key source, adding useful operational context without contradicting annotations.

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?

The description is compact and front-loads the core return values, with every sentence contributing auth, Pro-tier, ledger, or keyless behavior. The first sentence is dense and the phrase about a refusal's nextSteps is slightly convoluted, but overall it is efficient rather than padded.

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?

For a zero-parameter, read-only balance tool with an output schema, the description supplies sufficient context: what is returned, how auth works, key acquisition, Pro versus free behavior, and ledger scope. Nothing essential for correct invocation appears missing.

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?

The tool has zero input parameters, so there is no schema parameter meaning to clarify. The description appropriately adds that the key is supplied via Authorization or X-DiffiCat-Key headers and that keyless calls use address-based free allowance, which is relevant invocation context even though it is not a formal parameter.

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?

The description clearly states that the tool returns a prepaid balance plus the last 20 ledger entries, with distinct behavior for Pro and keyless calls. It is specific about the resource and scope, and it is easily distinguished from the unrelated screenshot, page-check, deploy-diff, report, and wait tools.

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 description explains the key-based versus keyless usage paths and notes where a human obtains a key, which gives clear context for invoking the tool. It does not explicitly name alternatives or when-not-to-use conditions, but no sibling tool is a close substitute.

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