Skip to main content
Glama

estimate

Read-onlyIdempotent

Estimate the USD cost of an LLM API call using the CWEP four-flow model (request generation, request processing, response generation, response reception). Returns a JSON object with the per-flow cost breakdown, the total, and the pricing source date. Unknown model names return HTTP 422 — check GET /api/v1/pricing on costa.nanotoll.dev for the supported list (no auth needed). Requires a valid API key (Bearer token); billing is per input character.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
modelYesModel name (e.g. gpt-4o).
input_tokensYesNumber of input (prompt) tokens.
output_tokensYesNumber of output (completion) tokens.

TDQS

A4.5/5.0
Behavior5/5

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

Annotations already mark this as read-only and idempotent, but the description adds valuable behavior beyond those hints: it specifies the JSON return shape with per-flow breakdown, the HTTP 422 error for unknown models, the public pricing endpoint, Bearer token requirement, and per-input-character billing. This is rich behavioral context that the annotations do not cover.

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 three tightly packed sentences that all earn their place: what it does, what it returns, and how errors/auth work. The main purpose is front-loaded, and there is no fluff or repetition.

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?

For a simple 3-parameter read-only tool with no output schema, the description covers everything an agent needs: return structure, error behavior, authentication, pricing-source lookup, and billing model. It is complete even without an output schema.

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%, with each parameter documented simply (model, input_tokens, output_tokens). The description adds context about model-name validation against a pricing list and billing per input character, but it doesn't add significant per-parameter meaning beyond the schema. Baseline 3 is appropriate.

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 'Estimate the USD cost of an LLM API call', a specific verb and resource that clearly distinguishes this tool from its siblings (convert, diff, generate, etc.), none of which perform cost estimation. It further specifies the CWEP four-flow model, removing ambiguity about what is estimated.

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

Usage Guidelines4/5

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

The description provides clear context: this tool is used to estimate cost before an LLM API call, and it explains the prerequisite of a valid API key. It doesn't explicitly state when not to use it or name alternative tools, but no sibling has overlapping functionality, so the guidance is sufficient.

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.5/5.0
Disambiguation5/5

Each tool performs a distinct operation: conversion, diffing, patching, pruning, llms.txt generation, validation, and cost estimation. The descriptions explicitly cross-reference related tools (diff/patch, generate/validate), which further prevents misselection.

Naming Consistency5/5

All seven tools use lowercase single-word imperative verbs (convert, diff, estimate, generate, patch, prune, validate), forming a consistent and predictable naming convention.

Tool Count5/5

Seven tools is within the ideal range and every tool has a clear purpose. The set is compact rather than sprawling, with no redundant or filler tools.

Completeness4/5

The paired workflows are complete: diff/patch, generate/validate, and convert/prune cover their stated operations without dead ends. The main gap is that the estimate workflow points to an external pricing endpoint for supported models rather than exposing model/pricing lookup as a first-class tool, which is a minor obstacle.

Resources