Skip to main content
Glama

Estimate job cost

estimate_cost
Read-onlyIdempotent

Free. Estimate the maximum model, compute and platform credits for a paid tool. Optional: paid tools can be called directly. Use it when the user asks what a job will cost. With cost_mode "agent_authored" and a specification, it also validates the specification with exactly the checks the paid tool runs and lists every problem as a blocker, so fix those before paying. No model calls or paid workload execution.

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": {
      "tool": "<tool>"
    },
    "name": "estimate_cost"
  }
}

Input Schema

NameRequiredDescriptionDefault
rowsNoOnly for cost_mode "agent_authored" on generate_safety_analysis: {conditions:[{target,description,severity,...}],modes:[{target,mode,severity,occurrence,detection,...}]}; with analysis "stpa": {losses:[{id,description}],hazards:[{id,description,losses}],controllers:[{target,processModel}],controlActions:[{from,to,name,ucas:[{id,type,context,contextVariables,hazards,constraint}|{type,notApplicable,rationale}]}],feedback:[{from,to,name,updates}],constraints:[{id,name,text}]}.
toolYes
modelNo
studyNo
eventsNo
formatNo
promptNo
stop_sNo
analysisNoFor generate_safety_analysis: fha, fmea, both (default) or stpa. stpa needs no standard.
fidelityNo
model_idNoA model from a generation job (model_ id) or a saved studio model (m_ id); a saved model is read at the head of main.
providerNo
standardNo
cost_modeNomanaged
max_depthNoOnly for run_agent_swarm: levels of division, 1 to 3 (default 2). At 2 and 3, a subsystem the orchestrator judges too large for one agent is divided again inside its frozen boundary.
subsystemNoFor reprompt_agent: qualified name of the subsystem, e.g. "Rover::DriveUnit". For run_agent_swarm on a saved model: the subsystem to decompose one level further (its parts get the agents); leave it out to work on the whole system's subsystems.
scenario_idNo
simulationsNo
specificationNoRequired for cost_mode "agent_authored" on generate_system_model and build_full_system: the system you wrote, as JSON matching this schema (the same schema describe_mbestudio returns as specification_schema). estimate_cost validates it for free with the same checks the paid tools run and lists every problem as a blocker, so call it before a paid tool.
simulation_typeNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed3 schema fields changed
    • addedInput schema / properties / analysis / description
      Added value: +"For generate_safety_analysis: fha, fmea, both (default) or stpa. stpa needs no standard."
    • changedInput schema / properties / analysis / enum
      Previous value: -[
      -  "fha",
      -  "fmea",
      -  "both"
      -]New value: +[
      +  "fha",
      +  "fmea",
      +  "both",
      +  "stpa"
      +]
    • changedInput schema / properties / rows / description
      Previous value: -"Only for cost_mode \"agent_authored\" on generate_safety_analysis: {conditions:[{target,description,severity,...}],modes:[{target,mode,severity,occurrence,detection,...}]}."New value: +"Only for cost_mode \"agent_authored\" on generate_safety_analysis: {conditions:[{target,description,severity,...}],modes:[{target,mode,severity,occurrence,detection,...}]}; with analysis \"stpa\": {losses:[{id,description}],hazards:[{id,description,losses}],controllers:[{target,processModel}],controlActions:[{from,to,name,ucas:[{id,type,context,contextVariables,hazards,constraint}|{type,notApplicable,rationale}]}],feedback:[{from,to,name,updates}],constraints:[{id,name,text}]}."
  2. First observed

TDQS

A4.1/5.0
Behavior4/5

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

Adds real behavior beyond the annotations: it is free, performs no model calls or paid workload execution, and in agent_authored mode runs exactly the paid tool's checks and reports every problem as a blocker. What it does not disclose is the shape of the cost estimate itself (breakdown, units, or how blockers are returned) for a tool with no output schema, so it stops short of full disclosure.

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?

Front-loads the key fact ('Free.') and the core action, then layers the validation mode and the safety guarantee. The agent_authored sentence is long and clause-heavy, but each clause carries information rather than filler.

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?

Covers the two calling modes and the free/no-execution guarantee, which is what matters most for a preflight cost tool. But for a tool with 20 parameters, nested objects, and no output schema, the reader still does not know what the estimate returns or how blockers are presented, and most per-tool parameters are left 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?

With 20 parameters and only 30% schema description coverage, the description should carry far more. It explains only the tool/cost_mode/specification interaction; the other high-impact parameters (format, provider, standard, fidelity, study, prompt, simulations, events) get no meaning from the description and are undocumented in the schema too.

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 specific verb and object ('Estimate the maximum model, compute and platform credits') for a named resource ('a paid tool'), and adds the second capability (validating an agent-authored specification with the paid tool's own checks). An agent can separate this from get_credit_balance or the paid generation tools without opening a 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?

Gives explicit when-to-use ('when the user asks what a job will cost'), names the alternative path ('paid tools can be called directly') and marks it optional, and specifies the second trigger ('with cost_mode "agent_authored" and a specification'). It even prescribes ordering: fix blockers before paying.

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