Skip to main content
Glama

Show the credit balance

get_credit_balance
Read-onlyIdempotent

The organization's credits left, the included and bought credits, the reset date, and one project's month: credits spent, ingestions, recalls, and what is left of its credit and ingestion caps. Use it when an ingestion is refused with 402 (out of credits) or 429 project-cap-reached. metered is false on a self-hosted deployment with no plan, and the credit figures are then null. Answers what GET /api/v1/usage answers for a project key; needs project Read on the project.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
projectNoThe project's slug, exactly as get_viewer or list_projects returned it. May be omitted when the organization has one live project.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • changedInput schema / properties / project / type
      Previous value: -"string"New value: +[
      +  "string",
      +  "null"
      +]
  2. First observed

TDQS

A4.1/5.0
Behavior4/5

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

Annotations already declare readOnlyHint, idempotentHint and destructiveHint=false, so safety is covered. The description adds real context beyond that: the required 'project Read' permission, the self-hosted edge case where metered is false and credit figures are null, and the error codes that motivate the call.

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 response contents are front-loaded in the first sentence, followed by the use case and then caveats. It is dense and slightly run-on but each sentence carries information an agent needs; nothing is padding.

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?

With no output schema, the description carries the burden of describing return values, and it does list the main fields. It also covers permission requirements and a deployment edge case. The default time window ('its month' = current month) and any paging/limits are left implicit, so it is not fully exhaustive.

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% for the single 'project' parameter, and the description adds no syntax, format or validation detail beyond what the schema already states. Baseline 3 applies when the schema does the heavy lifting.

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 names a specific resource (organization credit balance plus one project's monthly spend/ingestion/recall figures) and enumerates exactly which fields come back, including the included vs. bought credit split and remaining caps. An agent can tell this apart from generic siblings like get_usage or get_plan because the scope (org credits + a single project's month) is stated explicitly.

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 a concrete trigger: 'Use it when an ingestion is refused with 402 (out of credits) or 429 project-cap-reached.' That is a clear when-to-use condition rather than implied usage. It stops short of naming a sibling alternative to prefer in other situations, so it is not a full when/when-not/alternatives statement.

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