Skip to main content
Glama

Estimate what a run costs

estimate_cost
Read-onlyIdempotent

What one run of a workflow, agent or pipeline usually costs, without starting anything. For your own workflow or agent it is the average of its recent runs. For a library template (template_id, from search_templates; kind: agent for an agent template) it is the average of the library's own test runs of it, so you can quote a cost before copying it with use_template. With no runs to go on the cost comes back empty: say it is not known, and never guess a figure.

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {},
    "name": "estimate_cost"
  }
}

Input Schema

NameRequiredDescriptionDefault
kindNoWith template_id: the kind of template (default workflow).
agent_idNo
pipeline_idNoA pipeline: the cost of one full run, stage by stage.
template_idNo
workflow_idNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • changedInput schema / properties / kind / enum
      Previous value: -[
      -  "workflow",
      -  "agent"
      -]New value: +[
      +  "workflow",
      +  "agent",
      +  "pipeline"
      +]
  2. Changed1 schema field changed
    • addedInput schema / properties / pipeline_id
      Added value: +{
      +  "description": "A pipeline: the cost of one full run, stage by stage.",
      +  "type": "string"
      +}
  3. Changed2 schema fields changed
    • addedInput schema / properties / kind
      Added value: +{
      +  "description": "With template_id: the kind of template (default workflow).",
      +  "enum": [
      +    "workflow",
      +    "agent"
      +  ],
      +  "type": "string"
      +}
    • addedInput schema / properties / template_id
      Added value: +{
      +  "type": "string"
      +}
  4. First observed

TDQS

A4.3/5.0
Behavior4/5

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

Annotations already declare readOnly, idempotent, non-destructive and closed-world, so the safety profile is covered. The description still adds real behavioral value: it explains that nothing is started, that the value is an average of recent runs rather than a projection, and that an empty result means the cost is unknown and must not be invented. It does not describe the return shape or units, which keeps it from a 5.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Four compact sentences, front-loaded with the core definition and followed by the two usage cases and the empty-result rule. Every sentence carries information; the only slight drag is the nested clause about test runs.

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 read-only estimator with no output schema, the description covers both the meaning of the number (average of recent runs) and the degenerate case (empty means unknown). What is missing is the response shape — whether cost arrives as an amount with a currency, a breakdown, or a range — which an agent quoting a figure would want to know.

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?

With schema description coverage at 40%, the description compensates partially: it explains that template_id comes from search_templates and that kind should be 'agent' for an agent template, which is the most confusing pairing. However, agent_id, workflow_id and pipeline_id are left to their thin schema descriptions, and the description never states that only one target identifier is expected.

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 gives a specific verb and resource — the usual cost of one run of a workflow, agent or pipeline — and immediately distinguishes it from the run_* siblings with 'without starting anything.' An agent can tell this is a read-only estimate rather than an execution call without opening the 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 spells out two concrete usage paths: for your own workflow or agent it averages recent runs, and for a library template it averages the library's test runs so a cost can be quoted before calling use_template. It names the sibling search_templates as the source of template_id and routes the agent away from guessing when data is missing.

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