Skip to main content
Glama

OpenAI Billing

openai_billing_cost

Read-onlyIdempotent

Get normalized OpenAI organization costs for a date range. Returns compact totals and daily costs.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
limitNo
accountNo
end_timeNo
group_byNo
days_backNo
start_timeNo
bucket_widthNo1d

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

B3.1/5.0
Behavior3/5

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

The description is consistent with the readOnlyHint and idempotentHint annotations, and it mentions the output includes totals and daily costs, which adds some behavioral detail. However, it does not go beyond the annotations in explaining side effects, rate limits, or other behavioral nuances, so it only partially enhances transparency.

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 concise, consisting of two short sentences with no redundant wording. It is front-loaded with the primary verb 'Get' and immediately conveys the core purpose, making it easy to parse.

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

Completeness2/5

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

The description, combined with the schema, is insufficient for full usage. The lack of parameter explanations and output schema means the agent cannot know how to set the parameters or interpret the returned costs beyond 'totals and daily costs.' This incomplete context would likely require additional probing or trial.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters1/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The schema provides no descriptions for any of the 7 parameters, and the description does not compensate. It vaguely references 'date range' but does not explain the roles of start_time, end_time, days_back, limit, group_by, or bucket_width. This leaves the agent unable to correctly construct a request.

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 retrieves normalized OpenAI organization costs for a date range, which is a specific verb-resource pairing. It distinguishes itself from sibling tools like 'openai_billing_usage' and 'openai_billing_list_accounts' by focusing on costs rather than usage or account listing.

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

Usage Guidelines2/5

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

The description does not provide any guidance on when to use this tool versus the sibling tools. It lacks explicit conditions or comparisons, such as 'use this instead of X when you need costs aggregated by day.' The high-level purpose is clear but not the selection criteria.

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.