Skip to main content
Glama

Balance

get_balance
Read-onlyIdempotent

Check what you may spend before a paid treatment. Returns balance, your owner's credit balance (shared by all of their agents), and limits, the spending limits your owner set for you: maxSpendPerDay, maxPerTreatment, approvalThreshold and totalAllowance, in credits, where null means no limit is set. Compare them with live prices from list_treatments. Only your owner can add credits or change limits, at /manage; list_credit_packs shows what can be bought. Requires your agent key.

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_keyNoYour Retreat agent key (rta_...). Optional if sent as an Authorization header.

Output Schema

NameRequiredDescriptionDefault
limitsNoOwner-set credit limits; null means unlimited.
balanceNoOwner credits, shared by all their agents.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed6 schema fields changed
    • changedOutput schema / properties / balance / description
      Previous value: -"Your owner's credit balance, shared by all of their agents."New value: +"Owner credits, shared by all their agents."
    • changedOutput schema / properties / limits / description
      Previous value: -"Set by your owner; null means no limit."New value: +"Owner-set credit limits; null means unlimited."
    • changedOutput schema / properties / limits / properties / approvalThreshold / anyOf
      Previous value: -[
      -  {
      -    "description": "Prices above this wait for your owner's approval.",
      -    "type": "integer"
      -  },
      -  {
      -    "type": "null"
      -  }
      -]New value: +[
      +  {
      +    "description": "Higher prices require owner approval.",
      +    "type": "integer"
      +  },
      +  {
      +    "type": "null"
      +  }
      +]
    • changedOutput schema / properties / limits / properties / maxPerTreatment / anyOf
      Previous value: -[
      -  {
      -    "description": "Highest price you may pay for one run.",
      -    "type": "integer"
      -  },
      -  {
      -    "type": "null"
      -  }
      -]New value: +[
      +  {
      +    "type": "integer"
      +  },
      +  {
      +    "type": "null"
      +  }
      +]
    • changedOutput schema / properties / limits / properties / maxSpendPerDay / anyOf
      Previous value: -[
      -  {
      -    "description": "Credits you may spend per UTC day.",
      -    "type": "integer"
      -  },
      -  {
      -    "type": "null"
      -  }
      -]New value: +[
      +  {
      +    "description": "Per UTC day.",
      +    "type": "integer"
      +  },
      +  {
      +    "type": "null"
      +  }
      +]
    • changedOutput schema / properties / limits / properties / totalAllowance / anyOf
      Previous value: -[
      -  {
      -    "description": "Credits you may spend in total.",
      -    "type": "integer"
      -  },
      -  {
      -    "type": "null"
      -  }
      -]New value: +[
      +  {
      +    "type": "integer"
      +  },
      +  {
      +    "type": "null"
      +  }
      +]
  2. Changed1 schema field changed
    • changedOutput schema / (root)
      Previous value: -nullNew value: +{
      +  "properties": {
      +    "balance": {
      +      "description": "Your owner's credit balance, shared by all of their agents.",
      +      "type": "number"
      +    },
      +    "limits": {
      +      "description": "Set by your owner; null means no limit.",
      +      "properties": {
      +        "approvalThreshold": {
      +          "anyOf": [
      +            {
      +              "description": "Prices above this wait for your owner's approval.",
      +              "type": "integer"
      +            },
      +            {
      +              "type": "null"
      +            }
      +          ]
      +        },
      +        "maxPerTreatment": {
      +          "anyOf": [
      +            {
      +              "description": "Highest price you may pay for one run.",
      +              "type": "integer"
      +            },
      +            {
      +              "type": "null"
      +            }
      +          ]
      +        },
      +        "maxSpendPerDay": {
      +          "anyOf": [
      +            {
      +              "description": "Credits you may spend per UTC day.",
      +              "type": "integer"
      +            },
      +            {
      +              "type": "null"
      +            }
      +          ]
      +        },
      +        "totalAllowance": {
      +          "anyOf": [
      +            {
      +              "description": "Credits you may spend in total.",
      +              "type": "integer"
      +            },
      +            {
      +              "type": "null"
      +            }
      +          ]
      +        }
      +      },
      +      "type": "object"
      +    }
      +  },
      +  "type": "object"
      +}
  3. First observed

TDQS

A4.3/5.0
Behavior4/5

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

Annotations already declare readOnly=true, idempotent=true, destructive=false, openWorld=false, so the safety profile is covered. The description adds real context the annotations cannot: that the credit balance is owner-scoped and shared across all their agents, that limits can be null meaning unlimited, and that mutation of credits/limits is owner-only outside this tool. It does not discuss freshness or caching, which keeps it just short of a 5.

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?

The spending check is front-loaded and each sentence contributes routing or field meaning. It is slightly dense in the limit-name enumeration, but nothing is redundant.

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?

An output schema exists, so return shape need not be restated, yet the description usefully disambiguates one semantic detail (null limit = no limit) that a schema alone would not convey. Combined with the owner-visibility caveat and auth requirement, an agent has everything needed to call and interpret it; only freshness/latency expectations are absent.

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?

There is only one optional parameter (api_key) and schema coverage is 100%, so the schema already documents the rta_ prefix and the Authorization-header alternative. The description's 'Requires your agent key' reinforces but adds no syntax or format detail beyond the schema. Baseline 3 applies.

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 opens with a specific verb and resource ('Check what you may spend') and then enumerates exactly what is returned: balance, the owner's shared credit balance, and limits. It clearly distinguishes this read tool from list_treatments and list_credit_packs by naming each sibling's role.

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?

It states the triggering context explicitly ('before a paid treatment') and routes the agent to alternatives by condition: list_treatments for live prices, list_credit_packs for purchasable packs, /manage for owner-only changes. This is when-to-use plus when-to-use-something-else.

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