Skip to main content
Glama

Get credit usage

get_credit_usage
Read-onlyIdempotent

Company spend snapshot in one read: remaining FOS credits vs plan limit, reset date, named $ cap when set, Grok mix on the FOS ledger (optional Grok Bot / Grok Build when those hosts are attributed), and hosting from the books as this calendar month (hosting.this_month_usd + hosting.month YYYY-MM; zeros when empty). period (today/week/month/all) filters FOS credits and usage only — hosting is always the current calendar month from finance_data CASH OUT rows, not the period arg. On a developer-account pool, also returns true inference $ (true_cost_usd / true_cost_remaining_usd). Use when checking remaining credits, burn vs cap, or Grok mix.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
periodNoTime period for FOS credit/usage breakdown only. Does not change hosting (always this calendar month). Default: "month"
companyIdYesFreedomOS company id to act within (you must be a member). Required for company-scoped tools.
breakdown_byNoHow to group the usage data. Default: "both"

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • changedInput schema / properties / period / description
      Previous value: -"Time period for usage breakdown. Default: \"month\""New value: +"Time period for FOS credit/usage breakdown only. Does not change hosting (always this calendar month). Default: \"month\""
  2. First observed

TDQS

A4.4/5.0
Behavior4/5

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

Annotations already establish readOnly, idempotent, and non-destructive behavior. The description adds important behavioral nuance: period filters only FOS credits/usage, hosting always reflects the current calendar month from finance_data CASH OUT rows, zeros appear when empty, and developer-account pools return true inference costs. This goes beyond what annotations alone 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?

The description is dense but front-loaded with the main purpose and then systematically lists return components and caveats. It is longer than average, but every clause adds operational detail. The final usage sentence is a useful, non-redundant summary.

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?

With no output schema, the description carries the burden of explaining return values, and it does so thoroughly: named fields, default behaviors, edge cases like empty hosting, and special developer-pool fields. It also clarifies parameter scope and data provenance, leaving little ambiguity for an agent invoking the tool.

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?

Schema coverage is 100%, so the schema already documents all parameters. The description adds semantic value by clarifying that period affects only FOS credits/usage and never hosting, and by specifying the hosting source as finance_data CASH OUT rows. This context is not evident from the schema alone.

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: 'Company spend snapshot in one read' and then enumerates the exact data returned (FOS credits, plan limit, reset date, cap, Grok mix, hosting costs). This level of detail clearly distinguishes it from sibling spend/financial tools like get_cash_position or get_financial_summary.

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?

The description ends with an explicit usage directive: 'Use when checking remaining credits, burn vs cap, or Grok mix.' It does not name specific alternatives or exclusions, but the use cases are concrete enough for an agent to select this tool appropriately.

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