Skip to main content
Glama

Create or edit image

var2_create_image

Create a STILL IMAGE from a text prompt — "make/generate/draw an image of X", variations of an image — or edit one (type=image-to-image + image_url; image_refs[] locks character/style). A storyboard / N frames / N panels / comic strip with a consistent character = still IMAGES, one call per frame, not a video. Use var2_list_models for the complete current model list and supported settings; do not infer model availability from examples. Upscale/"sharper" → var2_modify_image; animate → var2_create_video; 3D → var2_create_3d.

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

Input Schema

NameRequiredDescriptionDefault
typeNoDefault text-to-image. grok-imagine-image-2 only: segment-map (FREE — splits image_url into named segments, returns segment_map_id + segments[{index,name,mask_url}]; prompt is ignored) then segment-edit (segment_map_id + mask_indexes + prompt — redraws only those segments).
modelNoDefault gpt-image-2.
promptYes
image_urlNoRequired for type=image-to-image. Storage URL, var2 share link (www.var2.ai/image/<id> — auto-resolved), or any public https URL.
image_refsNoOptional refs for type=image-to-image. Character/style lock on ref-aware models (nano-banana*, gpt-image-2, gpt-image-2-5, grok-imagine-image-2, seedream-5-pro); ignored by others.
resolutionNoOutput size of the NEW generation — does not upscale an existing image (that is var2_modify_image). seedream-5-pro: 1K or 2K (default 2K).
webhook_urlNoOptional. https:// URL var2 POSTs a signed delivery to when the asset is ready (or fails). Signature header: X-VAR2-Signature: t=<unix>, v1=<hex(hmac_sha256(webhook_secret, t + "." + body))>. Retried with exponential backoff (8 attempts over ~4 days).
aspect_ratioNo
mask_indexesNotype=segment-edit: segment index values (from segments[].index) to redraw.
segment_map_idNotype=segment-edit: the segment_map_id returned by type=segment-map.
idempotency_keyNoOptional. Retries with the same key never double-bill (dedupes on ai_jobs.request_id). Use a stable per-user-action value (e.g. a UUID).

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changed
    • changedInput schema / properties / image_refs / description
      Previous value: -"Optional refs for type=image-to-image. Character/style lock on ref-aware models (nano-banana*, gpt-image-2, gpt-image-2-5, grok-imagine-image-2); ignored by others."New value: +"Optional refs for type=image-to-image. Character/style lock on ref-aware models (nano-banana*, gpt-image-2, gpt-image-2-5, grok-imagine-image-2, seedream-5-pro); ignored by others."
    • changedInput schema / properties / resolution / description
      Previous value: -"Output size of the NEW generation — does not upscale an existing image (that is var2_modify_image)."New value: +"Output size of the NEW generation — does not upscale an existing image (that is var2_modify_image). seedream-5-pro: 1K or 2K (default 2K)."
  2. Changed5 schema fields changed
    • changedInput schema / properties / image_refs / description
      Previous value: -"Optional refs for type=image-to-image. Character/style lock on ref-aware models (nano-banana*, gpt-image-2, gpt-image-2-5); ignored by others."New value: +"Optional refs for type=image-to-image. Character/style lock on ref-aware models (nano-banana*, gpt-image-2, gpt-image-2-5, grok-imagine-image-2); ignored by others."
    • addedInput schema / properties / mask_indexes
      Added value: +{
      +  "description": "type=segment-edit: segment index values (from segments[].index) to redraw.",
      +  "items": {
      +    "minimum": 0,
      +    "type": "integer"
      +  },
      +  "minItems": 1,
      +  "type": "array"
      +}
    • addedInput schema / properties / segment_map_id
      Added value: +{
      +  "description": "type=segment-edit: the segment_map_id returned by type=segment-map.",
      +  "type": "string"
      +}
    • changedInput schema / properties / type / description
      Previous value: -"Default text-to-image."New value: +"Default text-to-image. grok-imagine-image-2 only: segment-map (FREE — splits image_url into named segments, returns segment_map_id + segments[{index,name,mask_url}]; prompt is ignored) then segment-edit (segment_map_id + mask_indexes + prompt — redraws only those segments)."
    • changedInput schema / properties / type / enum
      Previous value: -[
      -  "text-to-image",
      -  "image-to-image"
      -]New value: +[
      +  "text-to-image",
      +  "image-to-image",
      +  "segment-map",
      +  "segment-edit"
      +]
  3. Changed1 schema field changed
    • changedInput schema / properties / image_refs / description
      Previous value: -"Optional refs for type=image-to-image. Character/style lock on ref-aware models (nano-banana*, gpt-image-2); ignored by others."New value: +"Optional refs for type=image-to-image. Character/style lock on ref-aware models (nano-banana*, gpt-image-2, gpt-image-2-5); ignored by others."
  4. First observed

TDQS

A4.6/5.0
Behavior4/5

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

Annotations only declare not-read-only, open-world, non-destructive; the description adds real behavioral context beyond that — image_refs is ignored by non-ref-aware models, resolution applies to the new generation and never upscales an existing asset, and segment-map is free and ignores the prompt. The notable gap is that it never says the call is asynchronous or that results are retrieved via a sibling like var2_get_image_result, which matters for a non-destructive but billable generation tool.

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?

Front-loaded with the core action, then disambiguation, then routing; every clause carries either intent-matching vocabulary or an alternative-tool pointer. No filler or restatement of the title, despite the description being denser than average.

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 generation tool with no output schema and thin annotations, the description covers modes, model caveats, and sibling routing well. It is not fully complete because nothing tells the agent what happens after submission (async job, polling via a get-result sibling) or that cost can be estimated first, both of which affect how the tool should be invoked in a workflow.

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 already 82%, so the baseline is 3, but the description adds meaning the schema does not: which parameter combination expresses "edit" (type=image-to-image + image_url), what image_refs actually does (character/style lock, ignored elsewhere), and the crucial clarification that resolution is not an upscale. It stops short of explaining the two segment-* modes' relationship in the description itself, leaving that to the enum text.

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 ("Create a STILL IMAGE from a text prompt ... or edit one") and immediately scopes the ambiguous cases: storyboards/comic panels are still images, one call per frame, not video. An agent can distinguish this from var2_create_video, var2_create_3d, and var2_modify_image without opening any schema.

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

Usage Guidelines5/5

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

Explicit routing is given for the nearest alternatives: upscale/"sharper" goes to var2_modify_image, animation to var2_create_video, 3D to var2_create_3d, and model/settings questions to var2_list_models with an instruction not to infer availability from examples. The type=image-to-image path with image_url is named inline, so the when-to-use condition is unambiguous.

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