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 free allowance left for your address and prices, the USD a call costs beyond it; comparisons, discoveries and screenshots on old.difficat.com and new.difficat.com draw on demoPages first. 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
freeNoPer kind: remaining, total and resetsAt, the time the kind renews
errorNo
keyIdNo
pricesNoUSD per compared page (perPageTier2Usd past tierPages), discovery and screenshot
recentNo
balanceNo
overageNo
currencyNo
allowanceNo
nextStepsNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • addedOutput schema / properties / prices
      Added value: +{
      +  "additionalProperties": {},
      +  "description": "USD per compared page (perPageTier2Usd past tierPages), discovery and screenshot",
      +  "propertyNames": {
      +    "type": "string"
      +  },
      +  "type": "object"
      +}
  2. Changed1 schema field changed
    • addedOutput schema / properties / free / description
      Added value: +"Per kind: remaining, total and resetsAt, the time the kind renews"
  3. 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"
      +}
  4. 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"
  5. Changed1 schema field changed
    • addedOutput schema / properties / recent / items / properties / surface
      Added value: +{
      +  "enum": [
      +    "web",
      +    "api"
      +  ],
      +  "type": "string"
      +}
  6. 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"
      +}
  7. 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"
      +}
  8. Added

TDQS

B3.4/5.0
Behavior3/5

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

Annotations already declare readOnly, idempotent, non-destructive, so the safety profile is covered. The description adds real behavioral value: the header-based key resolution, the 20-entry ledger cap, the Pro allowance/overage breakdown, free-tier fallback with address-based allowance and per-call USD pricing, and a refusal's nextSteps pointing at /account. It stops short of describing failure modes or rate limits beyond that hint.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness3/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The core answer is front-loaded, which is good, but the whole definition is a single semicolon-chained sentence that is hard to parse and mixes return contents, key acquisition, Pro tier fields, and pricing. It is dense rather than wordy, but the structure hurts readability.

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

Completeness3/5

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

An output schema exists, so the detailed return description is partly redundant, though the explanation of the free/no-key mode and Pro fields adds context the schema likely cannot. Given that, the definition covers the essential cases but leaves error handling and pagination of the 20 entries unaddressed.

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 required parameters, so the baseline is 4. The description goes further by naming the implicit inputs not present in the empty schema: the Authorization: Bearer or X-DiffiCat-Key header, and the caller address used in the unauthenticated case.

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?

States a specific resource and scope: the prepaid balance plus the last 20 ledger entries, keyed off the request's Authorization or X-DiffiCat-Key header. It also distinguishes two modes (key vs. no key) and what each returns, so an agent knows exactly what it gets. No sibling differentiation, though none of the listed siblings overlap in function.

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?

Implied usage is clear: call it to read balance/ledger, and it explains how a human obtains a key on /account. However, there is no explicit when-to-use statement, no stated conditions for preferring another tool, and no framing of when it should not be called.

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