Skip to main content
Glama

Cost Report

gateway_cost_report

Track API usage costs and call statistics with session-level breakdowns across backends and tools. View spending for current sessions or all keys with 24-hour, 7-day, and 30-day rolling windows.

Instructions

Return current session and API-key spend. Includes total cost, call count, and breakdown by backend and tool. Per-key totals are shown for 24 h / 7 d / 30 d rolling windows.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
include_all_keysNoReturn all API key accumulators (admin view). Default false.
include_all_sessionsNoReturn all active sessions (admin view). Default false.
session_idNoSpecific session ID to report on. Defaults to current session.
Behavior3/5

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

With no annotations provided, the description carries the full burden. It discloses behavioral traits such as the types of data returned (cost, call count, breakdowns) and time windows, but lacks details on permissions, rate limits, or error handling. It adequately describes the operation but could be more comprehensive for a tool with potential admin functions.

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 is front-loaded with the core purpose in the first sentence, followed by specific details in a compact format. Every sentence adds essential information without redundancy, making it highly efficient and easy to parse.

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?

Given the tool's complexity (cost reporting with admin options) and lack of annotations or output schema, the description is mostly complete. It covers what data is returned and parameter context, but could benefit from mentioning output format or error cases to be fully comprehensive.

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 description coverage is 100%, so the schema fully documents parameters. The description adds value by explaining the context of the parameters (e.g., 'admin view' for include_all_keys and include_all_sessions, and default behavior for session_id), enhancing understanding beyond the schema's technical details.

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 clearly states the tool's purpose with specific verbs ('Return', 'Includes') and resources ('current session and API-key spend', 'total cost, call count, breakdown by backend and tool', 'Per-key totals'). It distinguishes itself from siblings by focusing on cost reporting, unlike tools like gateway_get_stats (general stats) or gateway_list_tools (tool listing).

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description implies usage for monitoring spend and provides context on what data is included (e.g., 24h/7d/30d windows), but it does not explicitly state when to use this tool versus alternatives like gateway_get_stats or provide exclusions. Usage is inferred from the content rather than directly guided.

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/MikkoParkkola/mcp-gateway'

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