Skip to main content
Glama

Estimate what a run costs

estimate_cost
Read-onlyIdempotent

What one run of a workflow or agent 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
template_idNo
workflow_idNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. 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"
      +}
  2. First observed

TDQS

A4.2/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 adds genuinely useful behavior beyond that: nothing is launched, the figure is an average of recent runs, library estimates come from the library's own test runs, and an empty result means unknown rather than zero. It does not say how 'recent' is bounded or what happens if identifiers conflict.

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?

Four sentences, front-loaded with the core definition, then the two modes, then the downstream use, then the no-data rule. No filler and no restatement of the name or title.

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?

With no output schema, the description usefully explains what an empty return means and forbids guessing a figure, which covers the main ambiguity. Given four optional parameters, the missing piece is the selection rule among workflow_id, agent_id and template_id.

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 only 25%, so the description carries extra weight, and it does explain template_id's source, the meaning of kind (agent for an agent template), and that workflow_id/agent_id refer to your own assets. However, it never states that these identifiers are mutually exclusive or which one takes precedence, leaving the agent to guess when passing combinations.

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?

States a precise verb and resource ('what one run ... usually costs') and immediately scopes it as a lookup that does not launch anything, which sharply separates it from run_workflow/run_agent siblings. The two computation modes (own runs vs. library test runs) are stated up front.

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?

Gives clear routing: use workflow_id/agent_id for your own assets, use template_id (obtained from search_templates) for library templates, and frames the result as a quote to give before calling use_template. It also prescribes the fallback behavior when no run data exists. It stops short of explicit exclusions or stating that only one identifier form should be supplied.

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