Skip to main content
Glama

Generate an image

generate_image

Generate one or more images from a prompt with the TopxAI image model. Billed at the model's per-request price plus a $0.01 call fee. Returns the images inline and as temporary signed links valid for up to one hour; cache capacity may expire them earlier.

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": "generate_image"
  }
}

Input Schema

NameRequiredDescriptionDefault
nNoNumber of images.
sizeNoWIDTHxHEIGHT, for example 1024x1024, 1536x1024, 1024x1536 or 2048x2048.1024x1024
modelNoImage model.
promptYesWhat to draw.
qualityNoOptional rendering quality.

Output Schema

NameRequiredDescriptionDefault
nNo
sizeNo
urlsNoTemporary signed links, valid for up to one hour; capacity eviction may expire them earlier.
errorNoPresent on a failed call: category (client, wallet, topxai, upstream, budget), message, charged, charged_usd.
modelNo
imagesNoImages returned inline as image content blocks.
chargedNoWhether the wallet was debited for this call.
request_idNoThe relay request id; the same id appears in the usage log.
charged_usdNoThe recorded wallet debit in USD, model price and call fee included.
inline_urlsNoLinks already represented by inline image content; avoid duplicate previews.
call_fee_usdNo
generated_imagesNoImages returned by the generation, including files linked instead of embedded.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4/5.0
Behavior4/5

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

With no annotations provided, the description carries the full behavioral burden and does well: it discloses cost structure and, importantly, that returned links are temporary signed URLs valid up to one hour and may expire sooner due to cache capacity. This is exactly the kind of non-obvious behavior an agent needs. It stops short of covering auth requirements, rate limits, or content-policy constraints.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Three sentences, front-loaded with what the tool does, then cost, then return semantics. No filler, and the most decision-relevant facts come first.

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?

The tool is simple (5 flat parameters, one required enum), and the description covers cost and return-link lifetime well. An output schema exists so return values need not be restated, making the inline return sentence mild redundancy rather than a gap. Only the absence of auth/policy constraints keeps this from a 5.

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 is already documented in the input schema, which sets the baseline at 3. The description adds no parameter-level meaning — it says nothing about how prompt wording, model choice, or size interact with output or billing.

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 leads with a specific verb and resource ('Generate one or more images from a prompt') and names the backing model (TopxAI), so the agent knows exactly what the tool produces. There are no sibling tools to disambiguate against, and the scope ('one or more') is precise.

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 by the purpose, and the billing sentence gives the agent a decision-relevant cost signal (per-request price plus a $0.01 call fee) that discourages casual calling. However, there is no explicit when-to-use or when-not-to-use guidance, nor any mention of prerequisites or alternatives.

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