Skip to main content
Glama

Estimate a generation's credit cost

estimate_cost
Read-only

Credit cost of one image, edit or isolate at a size and reference count, from the table renders are charged by. action is generate (default), edit or isolate. Spends nothing.

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
actionNoWhich tool you are pricing: generate_image, edit_image or isolate_reference_item.generate
resolutionNoIgnored for isolate, which is always 1K. For edit, the source image's size.1K
referenceImageCountNogenerate: how many imageInput URLs generate_image would be called with. Edit and isolate always include the source photo.

Output Schema

NameRequiredDescriptionDefault
actionNo
resolutionYes
estimatedCreditCostYes
referenceImageCountYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

B3.4/5.0
Behavior4/5

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

Annotations already declare readOnlyHint=true and openWorldHint=false, so the bar is lower. The description still adds real value: 'Spends nothing' confirms no credits are consumed, and 'from the table renders are charged by' tells the agent the number is authoritative rather than a rough guess. That is meaningful behavioral context beyond the structured fields.

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, front-loaded sentences with no filler, and the 'Spends nothing' reassurance lands as a clean closing beat. The phrasing 'from the table renders are charged by' is slightly tangled, but overall it earns its length.

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 an output schema present, return values needn't be explained, and full schema coverage handles parameter detail. What remains for the description is scope and the no-cost behavior, both of which it covers. It could go further by tying the estimate to the specific generation it precedes, but nothing critical is missing.

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%, so every parameter, its enum, and its default is already documented, including the isolate/1K and edit/source-size caveats. The description merely restates the action enum and mentions size and reference count at a high level, adding nothing the schema doesn't already carry. Baseline 3 applies.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose3/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description names the resource (credit cost of one image, edit or isolate) and the dimensions priced (size, reference count), so the verb+resource intent is inferable. But the opening is fragmented – it never says 'estimates' explicitly and relies on the title to supply the verb. It also doesn't contrast itself with the sibling get_credits_remaining, which an agent could easily confuse with this.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

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

'Spends nothing' implies this is a safe pre-flight check before calling generate_image or edit_image, which is the main usage signal. However, it never states when to prefer this over get_credits_remaining, nor does it say to call it before committing to a generation. Usage is hinted at rather than directed.

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