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.

Input Schema

NameRequiredDescriptionDefault
api_keyNoYour Retreat agent key (rta_...). Optional if sent as an Authorization header.

Output Schema

NameRequiredDescriptionDefault
limitsNoSet by your owner; null means no limit.
balanceNoYour owner's credit balance, shared by all of their agents.

Schema Changelog

Changes observed during successful MCP inspections.

  1. 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"
      +}
  2. First observed

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, idempotentHint=true, and destructiveHint=false. The description adds valuable context beyond annotations: the owner credit balance is shared across all of their agents, null limit fields mean no limit, and only the owner can add credits or change limits.

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 purpose is front-loaded and the paragraph is generally efficient. However, enumerating limit fields and explaining purchase paths makes it denser than necessary for a simple read tool, and some return-value detail overlaps with the output schema.

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 read-only balance check with rich annotations and an output schema, the description is complete enough: it covers purpose, authentication, returned concepts, null-limit semantics, and related tools. No critical behavioral or usage information 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%, so the schema already documents the api_key parameter and the Authorization-header alternative. The description's 'Requires your agent key' reinforces authentication but does not add syntax or format detail beyond what the schema provides.

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 uses a specific verb and resource: check spending capacity via balance and limits. It clearly distinguishes the tool from siblings by naming list_treatments for live prices and list_credit_packs for purchasing credits.

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 gives explicit timing ('before a paid treatment') and routes the agent to alternatives for related tasks: list_treatments for prices, list_credit_packs for buying, and /manage for owner-only credit/limit changes. This leaves little ambiguity about when to use get_balance versus sibling tools.

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