Skip to main content
Glama

get_cost_summary

Retrieve cost, call count, and token aggregates for a specified time range with breakdown by provider or model.

Instructions

Return cost / call count / token aggregates per time range, with a per-provider breakdown. When groupBy="none" is specified, a per-provider breakdown is still returned for backend compatibility (check the response.total field for the overall sum).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
groupByNoAggregation axis (overall sum / per provider / per model). Default providerprovider
rangePresetNoAggregation range. Default 7d7d
Behavior3/5

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

No annotations are provided, so the description carries the full burden. It discloses the behavioral nuance that groupBy='none' still returns per-provider breakdown with overall sum in response.total, but it does not mention whether the tool is read-only, any authentication requirements, or potential side effects.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description consists of two concise sentences with no wasted words. The first sentence clearly states the primary purpose, and the second provides a critical behavioral note. It is front-loaded and efficient.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

The tool has only two enum parameters and is fairly simple, but the description omits details about the response structure (besides mentioning response.total) and any error conditions. Given no output schema, a more complete description would include typical return fields or constraints.

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?

The input schema covers 100% of parameters with descriptions, setting a baseline of 3. The description adds extra meaning beyond the schema by explaining the backend compatibility behavior when groupBy='none' and pointing to the response.total field, which is not in the schema.

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 ('Return') and resource ('cost / call count / token aggregates per time range') and distinguishes itself from siblings like get_llm_budget or get_percentiles by clearly stating it provides aggregates with per-provider breakdown.

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 implies usage for retrieving cost summaries, and the note about groupBy='none' clarifies a special case. However, it does not explicitly state when to use this tool over alternatives such as get_llm_budget or get_percentiles, though the purpose is clear.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/argosvix/mcp-server'

If you have feedback or need assistance with the MCP directory API, please join our Discord server