Skip to main content
Glama

Write a video or image prompt

optimize_prompt

Write or rewrite a video or image prompt the way the chosen model reads it: Seedance 2.5, Seedance 2.0, Kling 4.0, MiniMax H3, Wan 3.0, Veo 3.1, Nano Banana 2.1, GPT Image 2.6 Sunburst or Seedream 5.5. Modes: write turns an idea or a rough draft into one ready prompt; refs says what each reference picture, video or sound is for; fix takes a prompt that came out wrong, what went wrong (and optionally up to 3 stills from the result) and returns the likely causes and a corrected prompt. Video models also have shots (a timed multi-shot prompt) and frames (connect a first frame, keyframes and a last frame); image models also have edit (change one picture: what changes, what stays) and variants (a planned set of pictures of one subject). Returns the prompt, a shot list or a picture layout when there is one, things to check and suggested settings. It only writes text; nothing is generated. Uses a few PopNow credits: small amounts run right away with the price in the reply; otherwise it quotes first and runs after the user agrees (max_credits). Then pass the prompt to create_video, or to create_image or edit_image for the image models.

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": {
      "model": "<model>",
      "idea": "<idea>"
    },
    "name": "optimize_prompt"
  }
}

Input Schema

NameRequiredDescriptionDefault
ideaYesThe user's idea or draft prompt, in their own words (up to 4000 characters). In fix mode: the exact prompt that was run.
keepNoedit and variants modes only (image models): what must stay the same, in the user's words (up to 400 characters).
modeNowrite (default: turn an idea or draft into one ready prompt), refs (say what each reference is for) or fix (the user ran a prompt and the result came out wrong). Video models also: shots (a timed multi-shot prompt) and frames (connect a first frame, keyframes and a last frame). Image models also: edit (change one picture, saying what changes and what stays) and variants (a set of pictures of the same subject, saying what stays and what each one changes).
noteNofix mode: anything else the user said about the result, in their words (up to 600 characters).
refsNorefs, frames, edit and variants modes: the references in the order they will be attached, up to 12. In frames mode only pictures: exactly one first, any number of keyframe, at most one last. In edit mode only pictures, exactly one with role source (the picture to edit).
taskNoVideo: text-to-video (words only), image-to-video (starts from a picture) or reference-to-video (reference pictures, videos or sounds; not with veo-3-1). Image: text-to-image (words only) or image-to-image (edits or builds on the user's pictures). Leave it out to match the mode.
modelYesThe model the prompt is for. Video: seedance-2-5 (Seedance 2.5), seedance-2-0 (Seedance 2.0), kling-4-0 (Kling 4.0), minimax-h3 (MiniMax H3), wan-3-0 (Wan 3.0) or veo-3-1 (Veo 3.1). Image: nano-banana-2-1 (Nano Banana 2.1), gpt-image-2-6-sunburst (GPT Image 2.6 Sunburst) or seedream-5-5 (Seedream 5.5).
shotsNoshots mode only: how many shots, 2 to 6 (each shot needs at least 2 seconds). Leave it out to let the idea decide.
localeNoLanguage for the shot list or layout, checks and notes, for example en, zh-CN, ja, de or fr. Default English.
secondsNoVideo models only: planned clip length in seconds, 2 to 30, and one the model can make. Leave it out to let the idea decide.
languageNoen (default): write the prompt in English. same: keep the language of the idea.
symptomsNofix mode: what went wrong. identity (the face drifts), anatomy (hands or bodies wrong), ignored (part of the prompt was ignored), text (garbled or unwanted text), style (wrong look). Video only: order (events in the wrong order), camera (the camera did something else), static (too little movement), chaos (too much or warped motion), speech (dialogue or lip sync wrong), continuity (things jump between shots), length (the action doesn't fit the length). Image only: composition (things in the wrong place or size), overedit (an edit changed parts that should have stayed), count (wrong number of people or objects), consistency (the pictures in a set don't match).
variantsNovariants mode only (image models): how many pictures in the set, 2 to 6. Leave it out to let the idea decide.
frame_urlsNofix mode, optional: up to 3 still pictures from the result (for a video, stills in time order; for an image model, the picture itself): popnow:// links from get_upload (after request_upload) or from earlier picture results. Not a video file.
max_creditsNoThe most PopNow credits the user agreed to spend on this. Only set it after the user confirmed a quoted price.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A4.4/5.0
Behavior4/5

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

Goes well beyond the annotations by disclosing the credit/consent flow: small amounts run immediately with the price in the reply, otherwise it quotes first and runs only after the user agrees via max_credits. It also clarifies the tool is text-only despite destructiveHint=false, and lists what comes back (prompt, shot list or layout, checks, suggested settings). It does not state failure modes for unsupported mode/model combinations, which keeps it from a 5.

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 first sentence front-loads purpose and model scope; the mode enumeration, return summary, credit policy and hand-off follow in a logical order with no filler. It is a dense single paragraph, and the long model/alias list plus mode glossary make it heavier to scan than necessary.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a 15-parameter, seven-mode tool with no output schema, the description covers what each mode produces, what is returned, the credit-confirmation gate, and the follow-on call. Nothing an agent needs to select a mode or chain the next tool is missing.

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 per-parameter meaning is already fully carried by the schema — including the mode, refs, symptoms and max_credits descriptions. The description's mode summary largely restates what the schema says, adding conceptual framing (video vs image modes) rather than new parameter semantics.

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 pair and resource ('Write or rewrite a video or image prompt'), names the nine target models, and immediately bounds the scope with 'It only writes text; nothing is generated.' It also distinguishes itself from downstream siblings by explicitly routing output to create_video, create_image and edit_image.

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?

Every mode is given a when-to-use condition (write = idea or rough draft, fix = a prompt that came out wrong, refs = what each reference is for), with video-only and image-only modes separated. It also states the terminal action after the tool returns, so an agent knows where this fits in the workflow.

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.