Skip to main content
Glama
openai-image-mcp-secure

openai-image-mcp-secure

by leiting684

estimate_image_cost

Read-only

Estimates OpenAI image generation and editing costs in USD offline from model, size, quality, prompt, and reference count, so you can budget paid requests before running them.

Instructions

Offline USD quote. Include the intended prompt and reference count (including mask). An omitted prompt budgets the maximum possible UTF-8 prompt. No files are read.

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": {
      "model": "<model>"
    },
    "name": "estimate_image_cost"
  }
}

Input Schema

NameRequiredDescriptionDefault
nNo
sizeNoauto
modelYes
promptNo
qualityNoauto
reference_countNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

B3.4/5.0
Behavior4/5

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

Annotations only declare readOnlyHint=true/destructiveHint=false; the description adds genuinely new behavior: the estimate is offline, no files are read, and omitting the prompt yields a conservative maximum-UTF-8 budget rather than a zero/empty estimate. It still doesn't say how the quote is derived or whether it is an upper bound versus an exact figure.

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; the most decision-relevant facts (offline, prompt/reference inputs, maximum-budget fallback, no file reads) come first. The telegraphic first sentence slightly hurts readability.

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?

For a read-only estimator with no output schema, the description conveys the return concept (USD) and the safety profile well, but with 0% schema coverage on six parameters it leaves several inputs unexplained, so an agent cannot confidently populate size, quality, n, or model from the description alone.

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?

Schema description coverage is 0% across six parameters, and the description only clarifies two of them (prompt semantics when omitted, reference_count including the mask). Model, n, size, and quality — including the enum quality values and the "auto" size default — are left entirely undocumented.

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

Purpose4/5

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

"Offline USD quote" states the resource (a USD cost quote) and a key qualifier (offline, i.e. no live generation call), which combined with the tool name makes the intent clear. It stops short of naming the sibling it differs from (get_cost_summary, get_budget_status) or saying explicitly that this estimates image generation cost.

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?

Usage is implied rather than stated: the instruction to "Include the intended prompt and reference count (including mask)" tells the agent how to get a meaningful quote but not when to prefer this over get_cost_summary or get_budget_status, and gives no exclusions.

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