Skip to main content
Glama

Read the balance

get_balance
Read-onlyIdempotent

Check how much an API key can spend now—wallet balance, active task holds, available funds, and remaining monthly limits—before costly requests or after a 402.

Instructions

What this Kunavo API key can spend right now: the account's wallet, what its running image, video and music tasks hold, what is available for a new request, the monthly limit on this key and the monthly cap on the account when there is one (each with what is left), and whether auto-recharge is on. A request is refused (402) when its estimate is more than what is available (auto-recharge refills the wallet first only when its balance is under the owner's threshold) or more than what is left under a monthly limit (near the limit, on the API's own count): call this before an expensive request, and after a 402 for a monthly limit to see what is left under each. Free to call.

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
unreadYesCeilings the API's answer left out or gave in a form that could not be read; each is null above. Normally empty.
accountYes
api_keyYes
balance_usdYesThe account's wallet, in USD. Can be below zero.
how_to_readYesWhat a request is refused on, and what these figures leave out.
reserved_usdYesHeld for the account's running image, video and music tasks.
auto_rechargeYes
available_usdYesThe wallet less what is held: what a new request's estimate is compared with.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4/5.0
Behavior4/5

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

Annotations already declare readOnly, idempotent and open-world, yet the description still adds real behavior: calling is free, a 402 is returned when the estimate exceeds available funds or remaining monthly allowance, and auto-recharge only fires when the wallet falls under the owner's threshold. It stops short of describing the shape of the response (e.g. fields per limit), but the operational semantics are well covered.

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?

Everything said earns its place, but it is delivered as one sprawling sentence with stacked parentheticals, making it slower to parse than it needs to be. Front-loading the spendable-now concept is good; the 402 and auto-recharge detail could be split into short, scannable sentences.

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 against an API with an output schema, this is complete: it tells the agent what categories of information come back, when to call it, and how refusal and auto-recharge interact. Nothing an agent needs in order to call it correctly is 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 takes zero parameters, so there is nothing for the description to disambiguate and the baseline of 4 applies. The description correctly adds no parameter talk and instead spends its words on return semantics.

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?

The description names a concrete resource with real scope: wallet balance, funds held by running image/video/music tasks, available amount, monthly key and account limits, and auto-recharge state. That is far more specific than 'get balance', but it never contrasts itself with the sibling get_usage, so an agent must infer the boundary between cost/consumption reporting and spendable headroom.

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?

It gives explicit triggers: call before an expensive request, and call after a 402 caused by a monthly limit to see remaining allowance under each limit. It does not name get_usage or any other alternative, so the when-not-to-use side is absent, but the positive guidance is clear and actionable.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.