Skip to main content
Glama

Estimate run cost

estimate_run
Read-only

Price a run before starting it. Creates nothing, charges nothing, asks nothing.

Returns credits (expected/min/max), current_balance, can_run, a breakdown, alternatives and console_url. Nobody was asked which workflow this is — confirm it and the price with the user before anything spends.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "workflow_id": "<workflow_id>"
    },
    "name": "estimate_run"
  }
}

Input Schema

NameRequiredDescriptionDefault
script_textNoReplaces the workflow's stored script. estimate_run and run_workflow must get the SAME text.
workflow_idYesThe workflow_id from list_workflows. Never invent one.
source_languageNoLocale of script_text, e.g. `ko-kr`. Must match the one given to estimate_run.

Output Schema

NameRequiredDescriptionDefault
pricedNo
can_runNo
breakdownNo
next_stepNo
run_tokenNo
dictionaryNo
console_urlNo
max_creditsNo
min_creditsNo
alternativesNo
deficit_at_maxNo
current_balanceNo
outcome_chargesNo
expected_creditsNo
will_incur_overageNo
estimated_overage_centsNo
overage_rate_cents_per_creditNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • addedOutput schema / properties / outcome_charges
      Added value: +{
      +  "items": {
      +    "additionalProperties": true,
      +    "type": "object"
      +  },
      +  "type": [
      +    "array",
      +    "null"
      +  ]
      +}
  2. Changed2 schema fields changed
    • addedOutput schema / $defs / DictionaryProspectOut
      Added value: +{
      +  "additionalProperties": true,
      +  "description": "Whether this run would apply the workspace's pronunciation entries, and why not.",
      +  "properties": {
      +    "applies": {
      +      "type": [
      +        "boolean",
      +        "null"
      +      ]
      +    },
      +    "excluded_entry_ids": {
      +      "items": {
      +        "type": "string"
      +      },
      +      "type": [
      +        "array",
      +        "null"
      +      ]
      +    },
      +    "policy": {
      +      "type": [
      +        "string",
      +        "null"
      +      ]
      +    },
      +    "reason": {
      +      "type": [
      +        "string",
      +        "null"
      +      ]
      +    }
      +  },
      +  "type": "object"
      +}
    • addedOutput schema / properties / dictionary
      Added value: +{
      +  "anyOf": [
      +    {
      +      "$ref": "#/$defs/DictionaryProspectOut"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ]
      +}
  3. First observed

TDQS

A4.1/5.0
Behavior4/5

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

Annotations declare readOnlyHint=true, and the description reinforces it with "Creates nothing, charges nothing, asks nothing" — the last clause is genuinely additive, telling the agent the call will not prompt for interactive input. The brief list of returned fields (credits expected/min/max, can_run, breakdown, console_url) adds behavioral context, though it is somewhat redundant with the output schema.

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?

Three short sentences, front-loaded with the no-side-effect guarantee, which is the fact an agent most needs first. The return-field enumeration is the only mildly wasteful part since an output schema exists, but it is compact.

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, three-parameter estimation tool with a full output schema and annotation coverage, this is nearly complete: cost model, no-charge guarantee, confirmation requirement, and returned fields are all present. The only gap is not explicitly pointing to run_workflow as the next step.

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%, and the parameter docs are strong (workflow_id must come from list_workflows, script_text must match run_workflow, source_language locale). The description itself adds no parameter-level detail beyond the warning that the workflow identity was not inferred and must be confirmed with the user — 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 opening sentence gives a specific verb and resource ("Price a run") plus the crucial temporal qualifier ("before starting it"), which is exactly what separates it from run_workflow. An agent can identify this as the dry-run estimator 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 Guidelines4/5

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

The final sentence establishes the workflow: estimate first, then confirm the identified workflow and price with the user before anything spends — clear sequencing guidance toward the sibling that actually costs money. It stops short of naming run_workflow explicitly as the follow-on call, so the routing is implied rather than spelled out.

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.