Skip to main content
Glama

generate_media

submit an AI image or video generation job for a launch. Returns 202 with a job_id; poll get_media_job for completion. Requires generate scope. script_video requires platform=instagram|tiktok and prompt is required (not just product_description). video and script_video only support 16:9 and 9:16 aspect ratios.

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": {
      "type": "<type>",
      "launch_id": "<launch_id>",
      "platform": "<platform>"
    },
    "name": "generate_media"
  }
}

Input Schema

NameRequiredDescriptionDefault
typeYesgeneration type
promptNoexplicit prompt — required for script_video
optionsNogeneration options
platformYestarget platform
launch_idYeslaunch ID this media is for
use_product_imageNouse the first image from the launch's product page as the reference (image type only; ignored when reference_image_url is set; errors when the launch has no product image)
product_descriptionNoproduct description (used to derive prompt when no explicit prompt is given)
reference_image_urlNoreference image URL — guides image style/composition via the edit endpoint

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.6/5.0
Behavior5/5

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

Annotations only declare readOnlyHint=false and destructiveHint=false, so the description carries the rest and does so well: 202 response, job_id, polling requirement, and the 'generate scope' authorization prerequisite. It also discloses validation behavior (script_video's platform/prompt requirements) that would otherwise only surface as a runtime error.

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?

Dense and front-loaded: operation and async contract first, then auth, then per-type constraints. No filler sentences and no restatement of the name or title.

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 8-parameter tool with a nested options object, no output schema, and only minimal annotations, the description covers the async lifecycle, authorization, and the trickiest type-specific rules. It could go further on which options are scoped to video vs. image, but nothing essential to a correct first call is missing.

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, but the description adds real meaning the schema cannot: video and script_video accept only 16:9 and 9:16 despite the schema enum listing ten ratios, and prompt is mandatory rather than derivable from product_description for script_video. Remaining gaps (which options apply to which type, e.g. duration_seconds) keep it off a 5.

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 concrete verb and resource — 'submit an AI image or video generation job for a launch' — which immediately separates it from siblings like generate_content or get_media_job. The async pattern (202 + job_id) is named in the same breath, so the agent knows exactly what operation this is.

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?

Explicitly routes follow-up work to get_media_job ('poll get_media_job for completion') and states the preconditions for the script_video path. It does not explicitly contrast itself with generate_content, so the when-not guidance is incomplete, but the when-and-how guidance is strong.

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