Skip to main content
Glama

generate_image

Creates or edits images from text prompts, then saves and returns the result as a file resource. Specify an input image for edits or variations.

Instructions

Generate a new image from a text prompt or edit an existing image using inputImagePath. Saves the result and returns a file resource.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
promptYesDescribe the image to generate or the edit to apply. Include the subject, context, and visual style; English is recommended for prompt enhancement.
purposeNoDescribe the image's intended use, such as a cookbook cover, social media post, or presentation slide, so prompt enhancement can adapt composition and detail.
qualityNoSet only when the user requests a quality level; otherwise omit to use the server default. fast prioritizes speed, balanced trades speed for detail, and quality prioritizes fidelity.
fileNameNoUse .png, .jpg, or .jpeg to request that output format from OpenAI or Seedream. Other or absent suffixes use the provider default; the saved filename is corrected to the actual image extension.
providerNoSet only when the user requests a specific image provider; otherwise omit to use the server default. The provider must have its API key configured on the server.
imageSizeNoSet the requested output size to 1K, 2K, or 4K. Omit to use the selected provider and quality preset's default. With Seedream, use 1K or 2K.
aspectRatioNoSet the requested output aspect ratio. Omit to use the provider default. OpenAI does not support 1:4, 1:8, 4:1, or 8:1.
blendImagesNoEnable when the prompt combines multiple visual elements that need coherent spatial relationships, lighting, or composition.
inputImagePathNoProvide an absolute path to a source image when editing, creating a variation, or transferring style.
useGoogleSearchNoEnable when using Gemini and the image requires current or time-sensitive web information. With OpenAI or Seedream, omit this option or set it to false.
useWorldKnowledgeNoEnable when accurate real-world details matter, such as historical figures, landmarks, cultures, or factual settings.
maintainCharacterConsistencyNoEnable when the same character must retain a recognizable appearance across poses or scenes.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changedv0.13.2
    • changedInput schema / properties / aspectRatio / description
      Previous value: -"Set the requested output aspect ratio. Omit to use the provider default."New value: +"Set the requested output aspect ratio. Omit to use the provider default. OpenAI does not support 1:4, 1:8, 4:1, or 8:1."
    • addedInput schema / properties / provider
      Added value: +{
      +  "description": "Set only when the user requests a specific image provider; otherwise omit to use the server default. The provider must have its API key configured on the server.",
      +  "enum": [
      +    "gemini",
      +    "openai",
      +    "seedream"
      +  ],
      +  "type": "string"
      +}
  2. Changed11 schema fields changedv0.12.1
    • changedInput schema / properties / aspectRatio / description
      Previous value: -"Aspect ratio for the generated image"New value: +"Set the requested output aspect ratio. Omit to use the provider default."
    • changedInput schema / properties / blendImages / description
      Previous value: -"Enable multi-image blending for combining multiple visual elements naturally. Use when prompt mentions multiple subjects or composite scenes"New value: +"Enable when the prompt combines multiple visual elements that need coherent spatial relationships, lighting, or composition."
    • changedInput schema / properties / fileName / description
      Previous value: -"Custom file name for the output image. Auto-generated if not specified."New value: +"Use .png, .jpg, or .jpeg to request that output format from OpenAI or Seedream. Other or absent suffixes use the provider default; the saved filename is corrected to the actual image extension."
    • changedInput schema / properties / imageSize / description
      Previous value: -"Image resolution for high-quality output. Specify \"1K\", \"2K\", or \"4K\" when you need specific resolution. Leave unspecified for standard quality."New value: +"Set the requested output size to 1K, 2K, or 4K. Omit to use the selected provider and quality preset's default. With Seedream, use 1K or 2K."
    • changedInput schema / properties / inputImagePath / description
      Previous value: -"Optional absolute path to source image for image-to-image generation. Use when generating variations, style transfers, or similar images based on an existing image (must be an absolute path)"New value: +"Provide an absolute path to a source image when editing, creating a variation, or transferring style."
    • changedInput schema / properties / maintainCharacterConsistency / description
      Previous value: -"Maintain character appearance consistency. Enable when generating same character in different poses/scenes"New value: +"Enable when the same character must retain a recognizable appearance across poses or scenes."
    • changedInput schema / properties / prompt / description
      Previous value: -"The prompt for image generation (English recommended for optimal structured prompt enhancement)"New value: +"Describe the image to generate or the edit to apply. Include the subject, context, and visual style; English is recommended for prompt enhancement."
    • changedInput schema / properties / purpose / description
      Previous value: -"Intended use for the image (e.g., cookbook cover, social media post, presentation slide). Influences lighting, composition, and detail level to match the context."New value: +"Describe the image's intended use, such as a cookbook cover, social media post, or presentation slide, so prompt enhancement can adapt composition and detail."
    • changedInput schema / properties / quality / description
      Previous value: -"Quality preset controlling speed/fidelity tradeoff. Only specify when the user explicitly requests a specific quality level; omit to use the server's configured default. \"fast\": best for drafts and rapid iteration. \"balanced\": better detail and coherence, moderate latency. \"quality\": highest fidelity, use for final deliverables where quality matters most."New value: +"Set only when the user requests a quality level; otherwise omit to use the server default. fast prioritizes speed, balanced trades speed for detail, and quality prioritizes fidelity."
    • changedInput schema / properties / useGoogleSearch / description
      Previous value: -"Enable Google Search grounding to access real-time web information for factually accurate image generation. Use when prompt requires current or time-sensitive data that may have changed since the model's knowledge cutoff. Leave disabled for creative, fictional, historical, or timeless content."New value: +"Enable when using Gemini and the image requires current or time-sensitive web information. With OpenAI or Seedream, omit this option or set it to false."
    • changedInput schema / properties / useWorldKnowledge / description
      Previous value: -"Use real-world knowledge for accurate context. Enable for historical figures, landmarks, or factual scenarios"New value: +"Enable when accurate real-world details matter, such as historical figures, landmarks, cultures, or factual settings."
  3. Addedv0.11.0
  4. Removedv0.6.0
  5. Changed4 schema fields changedv1.0.0
    • addedInput schema / properties / aspectRatio
      Added value: +{
      +  "description": "Aspect ratio for the generated image",
      +  "enum": [
      +    "1:1",
      +    "2:3",
      +    "3:2",
      +    "3:4",
      +    "4:3",
      +    "4:5",
      +    "5:4",
      +    "9:16",
      +    "16:9",
      +    "21:9"
      +  ],
      +  "type": "string"
      +}
    • addedInput schema / properties / imageSize
      Added value: +{
      +  "description": "Image resolution for high-quality output. Specify \"2K\" or \"4K\" when you need higher resolution images with better text rendering and fine details. Leave unspecified for standard quality.",
      +  "enum": [
      +    "2K",
      +    "4K"
      +  ],
      +  "type": "string"
      +}
    • addedInput schema / properties / purpose
      Added value: +{
      +  "description": "Intended use for the image (e.g., cookbook cover, social media post, presentation slide). Helps tailor visual style, quality level, and details to match the purpose.",
      +  "type": "string"
      +}
    • addedInput schema / properties / useGoogleSearch
      Added value: +{
      +  "description": "Enable Google Search grounding to access real-time web information for factually accurate image generation. Use when prompt requires current or time-sensitive data that may have changed since the model's knowledge cutoff. Leave disabled for creative, fictional, historical, or timeless content.",
      +  "type": "boolean"
      +}
  6. First observed

TDQS

A3.9/5.0
Behavior3/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. It honestly discloses that the tool saves the result and returns a file resource, which is meaningful side-effect and return information. However, it omits other behavioral traits such as potential cost, latency, provider API-key requirements, and file overwrite or naming behavior, so transparency is only partial.

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?

The description packs purpose, edit mode, and result behavior into two concise sentences. Every clause adds meaningful information; there is no redundancy, fluff, or unnecessary detail. The key action is front-loaded and the secondary outcome follows naturally.

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 12-parameter tool with no annotations and no output schema, the description provides a minimal but coherent end-to-end picture: input prompt or source image, save result, return a file resource. The rich parameter schema covers most input semantics, but the description does not address output format details, default provider/quality behavior, or potential side effects like file name resolution or costs. This leaves noticeable gaps for a complex generative tool.

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% across all 12 parameters, so the schema already handles parameter semantics thoroughly. The description adds only marginal context by mentioning text prompts and inputImagePath, which aligns with the prompt and inputImagePath parameters. There is no need for the description to repeat schema-level details, so baseline 3 is appropriate.

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 clearly identifies two concrete operations—generating from a text prompt and editing an existing image via inputImagePath—and states the outcome (saves and returns a file resource). It is specific about verb, resource, and mode, making the tool's purpose unmistakable even without sibling tools to differentiate.

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?

The description gives clear context for when to use the tool: generating new images or editing existing ones, with inputImagePath called out for the editing path. There are no sibling tools to contrast with, so it cannot name alternatives, but the two modes are explicit. It does not provide exclusions, but the context is sufficient for a standalone tool.

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

Deploy Server

Other Tools