Skip to main content
Glama
compute-finance

@compute-finance/mcp

compute_estimate

Read-onlyIdempotent

Estimate the nominal USD cost of any oracle-tracked model by providing input and output token counts. Returns base price, routing fee, and billed cost for comparing models and budgeting.

Instructions

Nominal USD cost for any oracle-tracked model given input/output token counts (no cache discounts) — basket members and catalog-only models on identical terms. Returns base_usd_cost (provider list price), routing_fee_usd and billed_usd_cost (what compute.finance charges), plus the routing_fee_rate they derive from. Compare models on base_usd_cost; budget on billed_usd_cost. price_source ('oracle-basket' | 'oracle-catalog') names the serving endpoint only and does not change the pricing basis, so two models with the same provider price return the same cost. Errors with 'Model not tracked by oracle' for unknown keys. Source: Oracle API (/v1/oracle/resolve + /v1/oracle/basket). For cache-aware cost, use analyze_session on a real transcript. Accepts canonical names like 'claude-sonnet-4.6'.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
modelYes
input_tokensYes
output_tokensYes
Behavior5/5

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

Annotations already mark the tool as read-only and idempotent, and the description adds valuable non-obvious behavioral details: price_source names only the serving endpoint and 'does not change the pricing basis,' so equal provider prices yield equal costs. It also discloses the exact error message for unknown models and the underlying Oracle API endpoints, which goes beyond the structured annotations.

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 front-loaded with the core purpose and is dense with operational details, but it is slightly long at roughly 120 words. Most sentences earn their place—return fields, error behavior, and alternative guidance—but the API source citation and price_source clarification could be condensed. Still, it is well-structured and scannable.

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?

There is no output schema, yet the description enumerates the returned fields (base_usd_cost, routing_fee_usd, billed_usd_cost, routing_fee_rate, price_source) and their intended use, documents the error condition, and provides an alternative tool for cache-aware costs. This makes the tool's behavior and outputs sufficiently transparent for an agent to select and invoke it correctly.

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 0%, so the description must compensate. It explains that input_tokens and output_tokens are 'token counts' and gives a canonical model name example ('claude-sonnet-4.6'). It does not explicitly mention non-negative integer constraints, but the semantics and examples make the three required parameters functionally clear.

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-object phrase: 'Nominal USD cost for any oracle-tracked model given input/output token counts' and immediately clarifies scope by adding '(no cache discounts)'. It distinguishes itself from siblings like compute_compare and analyze_session by noting identical terms for basket and catalog models and by naming cache-aware analysis as a different alternative.

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

Usage Guidelines5/5

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

It explicitly states when to use the tool versus alternatives: 'For cache-aware cost, use analyze_session on a real transcript.' It also provides field-level guidance on how to interpret results, e.g., 'Compare models on base_usd_cost; budget on billed_usd_cost,' which helps the agent choose the right value for a given task.

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/compute-finance/mcp'

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