Skip to main content
Glama

Generate images

generate_image

Create 1-4 images or an animated GIF from a detailed text prompt using your Sparkles Editor account, choosing model, size, format, and quality. Returns image bytes or job IDs for later retrieval.

Instructions

Generate 1-4 images from a text prompt with the user's Sparkles Editor account. This spends credits and submits the prompt to the site's moderation pipeline. Returns the generated image bytes when they are ready within the wait window; otherwise returns job ids for get_image. Use list_image_models first if the user has no model preference. GIF output requires a GPT Image 2.6 model and count=1.

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
sizeNoPixel size such as 1024x1024, or auto. Each side must be 3-4 digits, a multiple of 16, at most 3840; aspect ratio at most 3:1; total pixels 655360-8294400.
countNoNumber of images. Defaults to 1; GIF requires 1.
modelNoImage model id from list_image_models. Defaults to the site default.
formatNoOutput format. Defaults to png. GIF is supported only by GPT Image 2.6 models.
promptYesDetailed image description. Write the full visual prompt, not a short keyword list.
qualityNoOutput quality. Defaults to auto when the model supports it.
backgroundNoBackground preference. Transparent requires png or webp.
request_idNoOptional idempotency UUID. Reuse the same value only when retrying the same request after a network error.
frame_countNoGIF only: number of animation frames.
wait_secondsNoHow long to wait for completion. Defaults to 25 seconds; maximum 30.
frame_duration_msNoGIF only: frame delay in milliseconds, a multiple of 10.

Output Schema

NameRequiredDescriptionDefault
jobsYes
noteNo
imagesYes
pendingYes
requestIdNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.1

TDQS

A4.5/5.0
Behavior5/5

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

Goes well beyond the annotations (readOnly=false, openWorld=true, destructive=false) by disclosing the two side effects that matter: it spends credits and submits the prompt to a moderation pipeline. It also explains the synchronous-vs-async return contract, which annotations do not capture.

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?

Four sentences, front-loaded with purpose and cost, with no filler. The GIF sentence partially restates the count and format schema descriptions, which keeps it from being maximally tight.

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 an 11-parameter, cost-incurring generation tool with an output schema, the description covers the essential unknowns: spend, moderation, and the wait-window fallback. It omits the existence of job-polling and cancellation siblings (check_image_jobs, cancel_image_jobs), which an agent handling the async path would want.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100%, so the baseline is 3; the description earns an extra point by consolidating the cross-parameter constraint that GIF output requires a GPT Image 2.6 model and count=1, which the per-field schema cannot express on its own. It adds little on the other nine parameters.

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 ('Generate 1-4 images from a text prompt') with the account scope, and names the siblings it hands off to (get_image, list_image_models). An agent can distinguish it from list_images or get_image without opening a 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?

Gives explicit routing guidance: 'Use list_image_models first if the user has no model preference,' and directs the agent to get_image when the wait window expires. It does not mention check_image_jobs or cancel_image_jobs as polling/cancellation alternatives, so the alternative set is incomplete but the primary path is clear.

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