Skip to main content
Glama

aanet_get_remaining_balance

Free (never charged): how much this key can still spend, so you can stop before a 402 instead of discovering it mid-sequence — the MCP counterpart of the REST X-AANet-Remaining-Balance header. Takes only the key; works for the owner_key or any sub-key, against itself.

Returns `remaining` (what you can actually spend: the lower of the two
limits below), `key_budget_remaining` (this key's budget_cap minus what it
has spent; null if the key has no cap), `key_window_remaining` (units left
under the key's spend_limit_per_hour/day, whichever is tighter; null if it
has neither) and `workspace_balance` (the shared workspace balance), all in
raw integer units ($0.00001 each). `remaining` is the lowest of the three.
Comparing them tells you which one runs out first.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "api_key": "<api_key>"
    },
    "name": "aanet_get_remaining_balance"
  }
}

Input Schema

NameRequiredDescriptionDefault
api_keyYesBearer credential for this workspace: either the owner_key returned once by aanet_create_workspace/aanet_create_trial_workspace, or a sub-key returned by aanet_mint_subkey. Sent under the hood as `Authorization: Bearer <api_key>`. Owner-only tools reject a sub-key with a 403.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A4.4/5.0
Behavior5/5

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

With no annotations, the description carries the full behavioral burden and does so well: it declares the tool is free/never charged, that it takes only the key, that it works for owner_key or any sub-key 'against itself', and it explains each returned field including null conditions and the fact that `remaining` is the minimum of the others. This is far beyond what structured fields provide.

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-loads the purpose and the free/no-charge fact, then details the return fields. Two dense paragraphs with little waste, though the field-by-field enumeration and the parenthetical unit note are slightly verbose.

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?

No output schema or annotations exist, so the description must explain return values, and it fully documents all four fields, their units, and their null semantics. Nothing needed to call or interpret this tool is missing.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100% and the api_key field already documents owner_key vs sub-key and the 403 behavior. The description mostly restates this ('works for the owner_key or any sub-key'); only 'against itself' adds marginal new meaning, so baseline 3 is appropriate.

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 ('how much this key can still spend') and frames the scope precisely as the balance for the calling key. An agent can immediately distinguish this from siblings like aanet_get_workspace or aanet_get_forecast, which cover workspace-level and predictive data rather than per-key spendable 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?

Gives a clear motivating context ('stop before a 402 instead of discovering it mid-sequence'), which tells the agent when to call it. It does not name explicit alternatives (e.g. aanet_get_forecast) or state when not to use it, so it falls short of a 5.

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