Skip to main content
Glama

get_client_advance_balances

Read-only

Read the same per-client advance balances shown in ExpenseBot's Client advances section. Use for questions like 'how much of Acme's advance remains?', 'which client floats are still open?', or 'do I owe a client a refund?'. A negative ledger balance means money remains to refund; a positive balance means the client owes the user. Returns the existing app handoff for Refund leftover or Bill Client. Read-only: never records a refund, creates an invoice, or recomputes the ledger in model prose.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
clientNameNoOptional client name or canonical Client tag. Omit to list every open balance backed by a recorded client advance.
clientEmailNoClient account email. Accountants may use this only for an accepted ExpenseBot client.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
dataNo
messageNo
successYes
balancesNo
homeCurrencyNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • changedOutput schema / (root)
      Previous value: -nullNew value: +{
      +  "additionalProperties": true,
      +  "properties": {
      +    "balances": {
      +      "items": {
      +        "additionalProperties": true,
      +        "type": "object"
      +      },
      +      "type": "array"
      +    },
      +    "data": {
      +      "additionalProperties": true,
      +      "type": "object"
      +    },
      +    "homeCurrency": {
      +      "type": "string"
      +    },
      +    "message": {
      +      "type": "string"
      +    },
      +    "success": {
      +      "type": "boolean"
      +    }
      +  },
      +  "required": [
      +    "success"
      +  ],
      +  "type": "object"
      +}
  2. Changed1 schema field changed
    • changedOutput schema / (root)
      Previous value: -{
      -  "additionalProperties": true,
      -  "description": "Standard ExpenseBot tool result envelope. `message` is the human-readable summary the AI cites; `data` is the structured payload (totals, breakdowns, ids, etc.). On failure, `success` is false and `error` carries a code/message/hint triple.",
      -  "properties": {
      -    "data": {
      -      "additionalProperties": true,
      -      "description": "Structured payload. Shape varies per tool — common keys: total, breakdown, comparison, sampleMeta, ids, expenseId, reportId, signupUrl, results.",
      -      "type": "object"
      -    },
      -    "error": {
      -      "additionalProperties": true,
      -      "description": "Present only when success === false.",
      -      "properties": {
      -        "code": {
      -          "type": "string"
      -        },
      -        "hint": {
      -          "type": "string"
      -        },
      -        "message": {
      -          "type": "string"
      -        }
      -      },
      -      "type": "object"
      -    },
      -    "message": {
      -      "description": "Human-readable result text. Always present on success; prefer rendering this verbatim before any further reasoning.",
      -      "type": "string"
      -    },
      -    "sampleMeta": {
      -      "additionalProperties": true,
      -      "description": "Set when the underlying dataset was truncated. isTruncated=true means the agent saw a sample of `sampleCount` of `totalCount` rows; aggregate totals are still accurate.",
      -      "properties": {
      -        "isTruncated": {
      -          "type": "boolean"
      -        },
      -        "sampleCount": {
      -          "type": "integer"
      -        },
      -        "totalCount": {
      -          "type": "integer"
      -        }
      -      },
      -      "type": "object"
      -    },
      -    "success": {
      -      "description": "False on tool errors; check before reading `data`.",
      -      "type": "boolean"
      -    }
      -  },
      -  "type": "object"
      -}New value: +null
  3. Changed2 schema fields changed
    • changedInput schema / properties / clientName / description
      Previous value: -"Optional client name or canonical Client tag. Omit to list all open balances."New value: +"Optional client name or canonical Client tag. Omit to list every open balance backed by a recorded client advance."
    • removedInput schema / properties / days
      Removed value: -{
      -  "description": "Lookback window in days (default 365).",
      -  "maximum": 3650,
      -  "minimum": 30,
      -  "type": "integer"
      -}
  4. Added

TDQS

A4.6/5.0
Behavior5/5

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

Annotations already declare readOnlyHint=true and destructiveHint=false, and the description reinforces this with a strong behavioral guarantee: 'never records a refund, creates an invoice, or recomputes the ledger in model prose.' It also clarifies the meaning of positive/negative balances, which is not in the schema. This goes beyond annotations by explaining what the tool does NOT do, which is valuable for an agent to avoid accidental side effects.

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?

The description is concise but information-dense. It starts with the core purpose, then gives examples, then explains the sign convention, then the return value, and ends with the read-only guarantee. No sentence is redundant; each adds actionable detail. The structure is front-loaded with the main purpose, making it easy for an agent to scan.

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?

For a read-only tool with two optional parameters and an output schema, the description covers the essential usage: how to invoke it, what the balance signs mean, and what it returns. It doesn't discuss error handling (e.g., invalid client name) but the output schema likely covers that. It also doesn't mention rate limits or auth, but given the read-only nature and annotations, this is sufficient. Slightly incomplete because it doesn't note any caveats about data freshness or multi-currency, but overall it's quite complete.

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 schema covers both parameters with descriptions (coverage 100%), so the baseline is 3. The description adds extra value: for clientName, it clarifies that omitting it lists all open balances; for clientEmail, it restricts usage to accepted ExpenseBot clients. These clarifications are not in the schema and help the agent understand optionality and constraints. This exceeds the baseline.

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 the tool reads per-client advance balances, references the exact UI section ('Client advances section'), and provides concrete example questions. It also explains the sign convention (negative means refund, positive means client owes), which removes ambiguity. This distinguishes it from any sibling that might deal with invoices or refunds, though it doesn't name a specific alternative.

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 gives explicit use cases ('Use for questions like...') and explains the optional parameter behavior ('Omit to list every open balance'). It also mentions the return handoff for refund/bill actions. It doesn't explicitly state when not to use it or compare to alternatives, but the examples are clear enough for an agent to select it correctly. A slight gap is the lack of a note about using it vs. other financial tools like get_credits_refunds.

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.