Skip to main content
Glama

Get prepaid balance

get_balance
Read-onlyIdempotent

The prepaid balance and the last 20 ledger entries of the key the request carries in its Authorization: Bearer or X-DiffiCat-Key header. Call it to check what a key can still pay for; request_prepaid_key is the way to obtain a key. The balance is spendable money for any key, and the same balance the account spends in the web app; a Pro account’s key also returns allowance (included captured pages shared with the web app, pages used, reset time) and overage (amount this period, cap). Each draw names its surface, web or api. Free.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
codeNo
errorNo
keyIdNo
recentNo
balanceNo
overageNo
currencyNo
allowanceNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • addedOutput schema / properties / recent / items / properties / surface
      Added value: +{
      +  "enum": [
      +    "web",
      +    "api"
      +  ],
      +  "type": "string"
      +}
  2. 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"
      +}
  3. 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"
      +}
  4. Added

TDQS

A4.3/5.0
Behavior4/5

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

Annotations already declare this read-only, idempotent, non-destructive and closed-world, so the safety profile is covered. The description adds real value beyond them: the ledger depth (last 20 entries), the fact that the balance is the same spendable money the web app uses, the extra Pro-only allowance/overage fields, the per-entry surface label, and that the call is free.

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?

Front-loaded with the primary purpose and the routing hint before the detailed field semantics. The middle sentences about allowance/overage and draw surfaces are dense but each carries distinct information; only the "Free" fragment is terse enough to feel clipped.

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?

An output schema exists, so return-value documentation is not strictly required, yet the description still covers auth mechanism, ledger depth, Pro extras, and cost. Nothing an agent needs to invoke it correctly is missing; the main redundancy is explaining fields the output schema likely already defines.

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?

There are zero input parameters, so the baseline is 4. The description still adds meaning by explaining that the key is carried implicitly in the Authorization: Bearer or X-DiffiCat-Key header, which is the only input-relevant fact an agent needs.

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 first sentence names a specific verb+resource: it returns the prepaid balance plus the last 20 ledger entries for the key in the Authorization/X-DiffiCat-Key header. It also differentiates from the sibling request_prepaid_key, which is explicitly identified as the tool for obtaining a key rather than reading a balance.

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?

"Call it to check what a key can still pay for" states the use case plainly, and it routes key acquisition to request_prepaid_key. It does not state any when-not condition or what happens with an invalid/missing key, so it stops short of full explicit guidance.

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