Skip to main content
Glama

api_image_generate

Read-onlyIdempotent

Render an actual original image through customer-funded OpenAI Image API and return base64 file bytes with MIME metadata, not a prompt-only simulation. One call costs 0.01 USDC on Base x402; customer-owned provider credentials use X-Provider-Key header where needed.

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": {
      "prompt": "<prompt>"
    },
    "name": "api_image_generate"
  }
}

Input Schema

NameRequiredDescriptionDefault
sizeNo1024x1024, 1536x1024 or 1024x1536
formatNojpeg, png or webp; provider key via X-Provider-Key
promptYesOriginal image specification, max 4000 chars

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.1/5.0
Behavior4/5

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

Beyond the annotations, it discloses the payment model (0.01 USDC per call on Base x402) and the customer-owned credential header, which are real preconditions an agent must satisfy before invoking. It also states the return shape (base64 bytes plus MIME metadata), useful since there is no output schema. Error behavior, rate limits, and generation latency remain undisclosed; note the non-deterministic nature of image generation sits awkwardly with idempotentHint=true in the annotations.

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?

Two dense sentences with no filler; the differentiator ('not a prompt-only simulation') is front-loaded with the resource and verb. The second sentence stacks cost and credential details compactly, which is efficient though slightly cramped.

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?

Since no output schema exists, the description correctly carries the return-value burden by naming base64 bytes and MIME metadata. Combined with cost and auth prerequisites, an agent has nearly everything needed for a simple three-parameter tool; only failure modes and latency are absent.

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%, so size, format, and prompt are already documented in the schema, and the high coverage sets a baseline of 3. The description adds only the credential-header note that also appears in the format parameter description, so it contributes little extra parameter meaning.

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 description uses a concrete verb and resource ('Render an actual original image through customer-funded OpenAI Image API') and explicitly separates this tool from prompt-only simulation, which is the most likely confusion among the listed siblings (e.g. api_video_shot_prompts). An agent knows exactly what it produces 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?

It gives clear context for use: a real paid render is needed rather than a simulated prompt, the per-call cost of 0.01 USDC on Base x402 is stated so an agent can weigh whether to call it, and the X-Provider-Key requirement is flagged. It stops short of naming an explicit alternative tool or stating when NOT to call it.

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