Skip to main content
Glama

estimate_cost

Read-onlyIdempotent

Estimate the USD cost of an MCP tool call BEFORE invoking it. Returns median + P90 + average cost from the org's last-30-day history for this exact (server, tool) combo. Use this to make spend-aware decisions in your agent — e.g. confirm with the user before invoking tools where the estimate exceeds your budget. Returns isUnknown=true with zero cost when no baseline exists yet.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
modelNoOptional model identifier. Falls back to the historical median across all models when omitted.
toolNameYesTool name within the server, e.g. "browser_navigate".
serverNameYesMCP server name, e.g. "playwright" or "github".

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
modelNo
toolNameYes
isUnknownYes
avgCostUsdNo
p90CostUsdNo90th percentile cost — worst-case reasonable estimate.
sampleSizeYes
serverNameYes
successRateNo0-1, fraction of historical calls that succeeded.
avgLatencyMsNo
avgInputTokensNo
avgOutputTokensNo
estimatedCostUsdYesMedian cost from sample.

TDQS

A4.7/5.0
Behavior5/5

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

The description transparently details the output: 'Returns median + P90 + average cost from the org's last-30-day history' and 'Returns isUnknown=true with zero cost when no baseline exists yet.' This adds significant value beyond the annotations (readOnlyHint, idempotentHint) by explaining the specific data returned and edge cases.

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 and front-loaded: three sentences that state purpose, usage, and edge case. Every sentence adds value with no unnecessary words.

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?

Given the presence of an output schema (context signals indicate 'Has output schema: true'), the description adequately explains the return values and edge case. It covers all aspects needed for a pre-call estimation tool, and sibling tools are sufficiently differentiated.

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

Parameters3/5

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

Schema description coverage is 100%, so the baseline is 3. The description reinforces the tool's context (exact server/tool combo) but does not add new semantics beyond the schema descriptions. The parameters are clearly documented 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 clearly states the tool's purpose: 'Estimate the USD cost of an MCP tool call BEFORE invoking it.' It specifies the exact verb (estimate), resource (USD cost), and timing, distinguishing it from sibling tools like 'get_today_cost' or 'list_top_tools' which serve different purposes.

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?

The description provides explicit guidance: 'Use this to make spend-aware decisions in your agent — e.g. confirm with the user before invoking tools where the estimate exceeds your budget.' It also implies when not to use (when cost is irrelevant) and differentiates from siblings by focusing on per-call cost estimation.

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.

TDQS

A4.4/5.0
Disambiguation5/5

Each tool has a distinct purpose: cost estimation, session details, daily cost, monthly usage, session listing, top tools, and demo. No two tools overlap in functionality.

Naming Consistency5/5

All tool names follow a consistent verb_noun pattern (e.g., estimate_cost, get_session_details, list_top_tools). 'try_demo' also fits the pattern.

Tool Count5/5

Seven tools is an appropriate number for a cost monitoring server, covering estimation, session details, daily/monthly usage, and top tools without being overwhelming.

Completeness4/5

The tool set covers core cost monitoring needs: estimation, session drill-down, daily/monthly totals, and top tools. Minor gaps like historical trends or budget management are missing but not critical for the stated purpose.

Resources