Skip to main content
Glama

Model Ruler — AI Cost Calculators

Agent LLM Loop Cost Calculator

agent-loop-cost-calculator
Read-onlyIdempotent

Use for LLM inference/reasoning cost per successful multi-step agent task, including failure overhead and context growth across turns. Use agent-workflow-cost-calculator for iPaaS/app-action/MCP orchestration fees. Use automation-cost-calculator for generic Zapier/Make/n8n workflow billing.

Input Schema

NameRequiredDescriptionDefault
modelNoLLM model (default claude-sonnet-4-6)
providerNoLLM provider (default anthropic)
success_rateNoTask success rate 0-1 (default 0.7)
steps_per_taskNoAvg reasoning steps per task (default 5)
tasks_per_monthYesTasks attempted per month
tool_calls_per_stepNoAvg tool invocations per step (default 2)
context_growth_factorNoMultiplier on input tokens as conversation grows (default 1.4)
avg_tokens_in_per_turnNoAvg input tokens per turn (default 3000)
avg_tokens_out_per_turnNoAvg output tokens per turn (default 400)

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.2/5.0
Behavior3/5

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

Annotations already declare a safe, idempotent, closed-world read-only computation, so the safety profile needs no restating. The description adds real modeling context (failure overhead and context growth across turns affect the total), but says nothing about output units, currency, or the shape of the returned breakdown. Minor but genuine added value over structured fields.

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?

Three tightly packed sentences: the first establishes what it computes and the cost factors included, the next two route to alternatives. Zero filler and the purpose is front-loaded ahead of the disambiguation clauses.

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

Completeness4/5

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

For a nine-parameter, annotation-covered pure calculator with no output schema, the description covers what it computes and how it relates to siblings. The one gap is that it never hints at what the result contains (e.g., per-task cost, monthly total, currency), which matters for a tool with no 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 all nine parameters, defaults, and ranges documented in the schema, including success_rate, steps_per_task, and context_growth_factor. The description adds no parameter-level detail beyond that, so the baseline 3 applies.

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 states a precise verb and resource: cost calculation for LLM inference/reasoning per successful multi-step agent task, explicitly scoped to include failure overhead and context growth. It also names the two sibling calculators it is not, so an agent can disambiguate without opening any schema.

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?

It gives explicit routing rules: use agent-workflow-cost-calculator for iPaaS/app-action/MCP orchestration fees, and automation-cost-calculator for generic Zapier/Make/n8n workflow billing. The alternatives and the conditions that select them are named directly, leaving nothing to inference.

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.

Resources