Skip to main content
Glama

generate_video_and_wait

Create videos from text prompts or reference images, automatically wait for generation completion, and save the video locally, returning the file path for direct use.

Instructions

提交视频任务、轮询到完成并下载到本地,返回本地文件路径(零 base64)。可能需要数分钟。

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
imageNo可选,图生视频本地图片路径 / URL / Base64。
modelNo可选,默认取 AI_MEDIA_VIDEO_MODEL。
imagesNo可选,多张参考图生视频(最多 9 张)。无 image 时生效。
promptNo视频内容与运动描述。文生视频必填;图生视频可选。
secondsNo可选,即梦视频时长,字符串,例如 "15"。
durationNo可选,grok 视频时长(秒)。
output_dirNo可选,视频保存目录(默认 AI_MEDIA_VIDEO_OUTPUT_DIR)。
resolutionNo可选,如 720p、1k、2k。
aspect_ratioNo可选,如 16:9、9:16、1:1。
Behavior3/5

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

With no annotations provided, the description carries the full burden of behavioral disclosure. It does reveal important behavior: long-running (possibly minutes), waits via polling, downloads to disk, and returns a path rather than base64. However, it does not mention failure behavior, cleanup, disk-space side effects, or whether the call consumes significant quota, so it is only partially transparent.

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 is one compact, front-loaded sentence: it states the action (submit, poll, download, return), the key output format ('零 base64'), and the critical operational constraint ('可能需要数分钟'). There is no filler, repetition, or unnecessary detail.

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 a complex tool with 9 optional parameters and no output schema, the description gives enough context — it clarifies the return format, the conceptual pipeline, and the time cost — to allow an agent to invoke it correctly. It is slightly incomplete because it doesn't state what happens on failure/timeout, but the schema would already need to cover parameters.

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?

The schema description coverage is 100%, so the baseline is 3. The description does not add much parameter-level meaning beyond the schema; the only added value is the promise of returning a local path and zero base64, which relates to the output rather than the parameters. The parameters themselves are already sufficiently documented in the schema.

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?

The description states a clear verb chain: submit video task, poll until completion, download locally, and return the local file path (zero base64). This distinguishes it from sibling tools such as generate_video (which likely just submits) and get_video_status (which just polls). It loses one point for not naming the sibling explicitly, but the unique combined flow is unmistakable.

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 phrase 'poll until completion and download locally' implies this is the correct tool when the agent needs the finished video available as a file, not merely a task ID or status. The sibling context further supports this inference. It lacks explicit 'use X instead when...' guidance, so it is good but not exemplary.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/wojiaopanhaoran/ai-media-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server