estimate_cost

Estimate the USD cost of an LLM API call for a given model and token counts. Returns input/output/total cost, plus reseller markup vs. the upstream model when applicable.

Server Modelmeter https://modelmeter.xyz/mcp
Category Read
Risk class Low
Parameters 33 required

What estimate_cost does on Modelmeter

AI agents call estimate_cost to retrieve information from Modelmeter without modifying anything — typically the context-gathering step in research, monitoring, and reporting workflows, before the agent takes action elsewhere.

ParameterTypeRequiredDescription
model string Yes Model id in provider/model form, e.g. anthropic/claude-opus-4-8. Use list_models to discover ids.
input_tokens integer Yes Number of input (prompt) tokens.
output_tokens integer Yes Number of output (completion) tokens.

Parameters from the server's own tool schema.

Why estimate_cost needs a policy

This tool queries pricing data and performs calculations to return cost estimates. It has no side effects: it does not create, modify, delete, or execute operations. No financial transactions occur; it only reads pricing information and produces an estimate.

From the tool's definition Tool description indicates it 'estimate[s]' and 'returns' cost information. The verb 'estimate' and the focus on returning calculated values—'input/output/total cost'—show this is a retrieval operation that performs a read-only calculation without modifying,…

Questions about estimate_cost

What does the estimate_cost tool do? +

Estimate the USD cost of an LLM API call for a given model and token counts. Returns input/output/total cost, plus reseller markup vs. the upstream model when applicable. It is categorised as a Read tool in the Modelmeter MCP Server, which means it retrieves data without modifying state.

What parameters does estimate_cost accept? +

estimate_cost accepts 3 parameters: model, input_tokens, output_tokens. Required: model, input_tokens, output_tokens. The full parameter table on this page comes from the server's own tool schema.

How do I enforce a policy on estimate_cost? +

Register the Modelmeter MCP server in PolicyLayer and add a rule for estimate_cost: allow, deny, rate-limit, or require approval. Point your MCP client at the PolicyLayer proxy URL and the rule is enforced on every call, before it reaches Modelmeter. Nothing to install.

What risk level is estimate_cost? +

estimate_cost is a Read tool with low risk. Read-only tools are generally safe to allow by default.

Can I rate-limit estimate_cost? +

Yes. Add a rate_limit block to the estimate_cost rule in your PolicyLayer policy. For example, setting max: 10 and window: 60 limits the tool to 10 calls per minute. Rate limits are tracked per agent session and reset automatically.

How do I block estimate_cost completely? +

Set action: deny in the PolicyLayer policy for estimate_cost. The AI agent will receive a policy violation error and cannot call the tool. You can also include a reason field to explain why the tool is blocked.

What MCP server provides estimate_cost? +

estimate_cost is provided by the Modelmeter MCP server (https://modelmeter.xyz/mcp). PolicyLayer sits as a proxy in front of this server to enforce policies before tool calls reach the server.

// THE FULL RECORD

estimate_cost is one line of Modelmeter's registry record.

The record carries the whole server: verified identity, auth posture, risk grade, every tool classified, recommended policy — re-checked continuously.

Teams ship this data inside their own products. See what a licence covers →

// GET IN TOUCH

Have a question or want to learn more? Send us a message.

Message sent.

We'll get back to you soon.