Skip to main content
Glama

Optimize Prompt

optimize_prompt

Enhance basic image prompts by adding lighting, composition, color, and style details with AI to improve generation quality.

Instructions

Enhance a basic prompt for dramatically better image results.

Uses AI to add details about lighting, composition, colors, textures, and artistic techniques. The #1 way to improve generation quality.

Input Schema

NameRequiredDescriptionDefault
modelNoText model override. Default gemini-3.5-flash-lite. Use gemini-3.8-flash for harder OCR or reasoning.
styleNoTarget style (optional): photorealistic, illustration, 3d_render, pixel_art, watercolor, oil_painting, sketch, anime, cinematic, product_photo, architecture, food, fashion, abstract
promptYesBasic prompt to enhance

Output Schema

NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changedv0.6.0
    • addedInput schema / properties / model
      Added value: +{
      +  "anyOf": [
      +    {
      +      "type": "string"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ],
      +  "default": null,
      +  "description": "Text model override. Default gemini-3.5-flash-lite.\nUse gemini-3.8-flash for harder OCR or reasoning."
      +}
  2. First observedv0.5.4

TDQS

A3.5/5.0
Behavior3/5

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

No annotations, so the description carries the full behavioral burden. It discloses that an AI/text model performs the rewrite and what dimensions get enriched, which is genuinely informative, but it omits cost implications (notably given the estimate_cost sibling), latency, and whether the original prompt is preserved or mutated.

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?

The purpose and the enhancement dimensions are front-loaded in the first two sentences with little waste. The closing line ('The #1 way to improve generation quality') is marketing filler rather than operational information.

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?

With an output schema present and full parameter coverage in the schema, the description need not explain return values, and it adequately conveys what the tool does and what the enhancement covers. The remaining gap is workflow placement relative to generate_image and cost expectations.

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%, including enumerated style values and model-override guidance, so the schema does the heavy lifting. The description adds no parameter-level meaning (no advice on when a style choice matters or what happens if style is null), leaving this at the baseline.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

Specific verb ('enhance') plus resource ('prompt') and an explicit outcome ('better image results'), with a sentence on what the AI adds (lighting, composition, colors, textures, techniques). It is clearly a prompt-rewriting step rather than generation, but it never names generate_image or another sibling, so differentiation is implicit.

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?

'The #1 way to improve generation quality' hints that this should precede image generation, but the description never states a workflow ('call before generate_image'), a when-not condition, or what to do if the prompt is already detailed. Usage is implied rather than instructed.

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