Skip to main content
Glama

Check prepaid balance

get_balance
Read-onlyIdempotent

Shows how many scanned pages are left on the prepaid balance for this API key.

Use when: before a batch of scans or photos, or when parse_invoice answered insufficient_balance and the remaining amount must be confirmed. Do not use when: the user asks about invoice content — that is get_result.

Side effects and cost: none. The number comes from the same counter that blocks parsing, so it can change between two calls while a batch is running.

Parameter interactions and edge cases: this is the same counter that blocks parsing, so a balance of zero makes the next parse_invoice fail with insufficient_balance and a topup_link is the only way forward. Two keys of one account see the same number, because usage is counted per account. The number can drop between two calls while a batch runs, and pages parsed on the free cabinet allowance are not part of it.

Returns: {ok, balance} with remaining pages and the current plan.

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
api_keyNoDueBuddy API key (starts with dd_). Omit it when the server was added with an X-Api-Key header or DUEBUDDY_API_KEY is set; the call returns api_key_required instead of raising.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • addedInput schema / properties / api_key / description
      Added value: +"DueBuddy API key (starts with dd_). Omit it when the server was added with an X-Api-Key header or DUEBUDDY_API_KEY is set; the call returns api_key_required instead of raising."
  2. Changed2 schema fields changed
    • addedInput schema / properties / api_key / default
      Added value: +""
    • removedInput schema / required
      Removed value: -[
      -  "api_key"
      -]
  3. First observed

TDQS

A4.8/5.0
Behavior5/5

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

Goes well beyond the readOnly/idempotent annotations: states the call is free, that the value can change between calls during a batch, that usage is counted per account so two keys share a number, that free cabinet pages are excluded, and that zero balance makes the next parse_invoice fail with a topup_link as the only remedy.

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?

Sections are labeled and front-loaded (purpose, when, when-not, side effects, returns), but the point that the counter is shared with parsing and can change between calls is stated twice, once under side effects and again under edge cases.

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 no output schema, the description supplies the return shape ({ok, balance} plus plan), and covers cost, stability, account scoping, and the failure path to topup_link, leaving nothing an agent needs to call it correctly.

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 single api_key parameter is fully documented in the schema, but the description still adds value by explaining that two keys of one account see the same number, which clarifies the scoping semantics of the key beyond the schema's auth instructions.

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 ('Shows how many scanned pages are left on the prepaid balance') scoped to the API key, and explicitly separates itself from get_result for invoice content.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Provides an explicit 'Use when' (before batches, after an insufficient_balance answer) and 'Do not use when' that redirects to get_result, plus a concrete trigger condition on parse_invoice output.

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.