Skip to main content
Glama

Estimate task cost

estimate_cost
Read-only

Quotes the USD cost for one image or video task before ordering, without creating an order or reserving funds, so you can check pricing and set spending limits.

Instructions

Return the USD cost for one task without creating an order or reserving funds. Uses the same API pricing channel as create_task (the same account entitlements apply to Web, REST and MCP). Call this before create_task.

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

Input Schema

NameRequiredDescriptionDefault
inputsYesSame inputs object you would pass to create_task.
modelIdYesPublic modelId from list_models.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.2.1

TDQS

A4.3/5.0
Behavior4/5

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

Annotations already declare readOnlyHint=true and destructiveHint=false, so the description does not need to restate safety. It adds meaningful context beyond them: pricing comes from the same channel as create_task, the same account entitlements apply, and behavior is consistent across Web, REST and MCP. It stops short of covering error cases or rate limits, so not 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?

Three short sentences, front-loaded with the core action and side-effect-free promise, with the cross-reference to create_task closing it out. The parenthetical about Web/REST/MCP is slightly tangential but still earns its place.

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 two-parameter read-only estimator with no output schema, the description covers the return value (USD cost), the side-effect profile, and the intended call order. The nested inputs object is adequately handled by pointing at create_task's contract.

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 coverage is 100%, and the schema itself already says inputs is the same object passed to create_task and modelId is a public modelId from list_models, so the description contributes little extra parameter meaning. It only implies that the two parameters together fully describe 'one task'.

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 resource ('Return the USD cost for one task') and immediately constrains scope ('without creating an order or reserving funds'), which separates it cleanly from create_task in the sibling list.

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 an explicit sequencing rule ('Call this before create_task') and clarifies that no order or funds are involved, so an agent knows both when to reach for it and what it will not do.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.