Skip to main content
Glama

Estimate call cost

cost_estimate
Read-onlyIdempotent

Estimate the upper bound of calls, tokens, and cost for delegate, consensus, or swarm_run tasks before execution, using optional pricing data. Avoids provider calls while planning AI workloads.

Instructions

Upper bound of calls, tokens and cost (when DZ23_PRICES_FILE has prices) for delegate, consensus or swarm_run before running it. No provider calls.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
toolNodelegate
rolesNo
modelsNo
promptNoPrompt or goal to size.
synthesisNoheuristic
task_typeNo
max_agentsNo
prompt_charsNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv4.3.0

TDQS

A4/5.0
Behavior4/5

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

Annotations already declare readOnlyHint, idempotentHint, openWorldHint, and destructiveHint. The description adds meaningful behavioral context beyond those: it returns an 'upper bound,' depends on DZ23_PRICES_FILE for cost, and makes no provider calls. No contradiction with annotations.

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 whole description is a single, dense sentence. It front-loads the key output ('Upper bound of calls, tokens and cost'), then states the scoped tools, the timing, and the condition regarding DZ23_PRICES_FILE. There is no filler or redundancy.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

The description adequately conveys the tool's purpose and caveats for a pre-run estimate. However, with 8 parameters, no output schema, and very low schema coverage, it leaves much about how to configure the estimate and what the response contains unexplained.

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

Parameters2/5

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

Schema description coverage is only 13% (only 'prompt' is described), and the description does not explain how roles, models, synthesis, task_type, max_agents, or prompt_chars affect the estimate. The only implicit parameter mapping is the mention of delegate/consensus/swarm_run to the 'tool' enum, which is insufficient given the low schema coverage.

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 uses a specific verb ('Estimate') and resource ('call cost'), and explicitly scopes the tool to delegate, consensus, or swarm_run. It clearly distinguishes this tool from those execution siblings by framing it as a pre-run estimator.

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 states when to use the tool: 'before running it.' It also adds a useful exclusion, 'No provider calls,' clarifying that the estimator makes no external provider requests. It does not explicitly name alternatives, but the intended context is clear.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.