Estimate the cost of LLM calls
estimate_llm_costUSD cost of a call to a model from its token counts, at list price, and the total for a number of such calls.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"model": "<model>",
"inputTokens": "<inputTokens>",
"outputTokens": "<outputTokens>"
},
"name": "estimate_llm_cost"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| calls | No | Number of calls like this one. | |
| model | Yes | Model id. | |
| inputTokens | Yes | Prompt tokens per call, including any cached ones. | |
| cachedTokens | No | How many of the prompt tokens are read from the prompt cache. | |
| outputTokens | Yes | Reply tokens per call. | |
| cacheWriteTokens | No | Prompt tokens written to the cache (Anthropic). |