Skip to main content
Glama

Analyze a video for music or sound-effect direction

analyze_video

Analyze a video to generate a creative brief for music and sound design. Use its prompts to direct scoring and SFX generation when you don't know what audio the footage needs.

Instructions

Analyze a video and return a CREATIVE BRIEF derived from the footage itself. Generates NOTHING — no audio, no video, no file is written. mode picks which brief comes back: "both" (the default) returns a music-direction brief in segments/variations AND a sound-design brief in sfx_segments/sfx_prompt in one call; "music" returns only the scoring brief (a time-aligned section plan plus one ready-to-use generation prompt per variation); "sfx" returns only the sound-design brief. All three modes cost the same. Use it when the user does not know what music or sound effects the video should get, then feed a variation's prompt into video_to_music, video_to_sfx, video_to_sound or their video-to-video counterparts.

⚠️ COST WARNING: This tool makes an API call to Sonilo which may incur charges. Only use when explicitly requested by the user.

Args: video_path (str, optional): Absolute local path, or relative to SONILO_MCP_BASE_PATH. Subject to the account upload cap. video_url (str, optional): HTTP(S) URL to a video file. prompt (str, optional): Guidance for the analysis, e.g. 'focus on the chase'. At most 2000 characters. variants_num (int, optional): 1-5, default 1. How many independent briefs to author for the same video. Billed per brief. mode (str, optional): "both" (default), "music" or "sfx".

Exactly one of video_path and video_url must be provided. Maximum video duration is 480 seconds (8 minutes); billing has a 10-second floor, so a very short clip costs the same as a 10-second one.

Returns: TextContent holding the brief as JSON: mode (echo of the request), segments (start, end, label, prompt) and variations (one prompt each); in both mode also sfx_segments (same shape as segments) and sfx_prompt (a single string, not one per variation). No file path is returned because no file is written. On timeout the error message includes the task_id — recover the brief with get_sfx_task.

Input Schema

NameRequiredDescriptionDefault
modeNo
promptNo
video_urlNo
video_pathNo
variants_numNo

Output Schema

NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv0.28.0

TDQS

A4.9/5.0
Behavior5/5

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

Adds substantial context beyond the annotations: an external Sonilo API call may incur charges, variants_num is billed per brief, there is a 10-second billing floor and an 8-minute duration cap, and the upload cap applies. Annotations already mark openWorldHint=true and idempotentHint=false, and the description is consistent with those while supplying the cost and limit details the annotations cannot express.

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?

Well front-loaded — the mode semantics and usage trigger come before the parameter list, and the cost warning is visually flagged. It is somewhat long and repeats the 'no file is written' point in both the opening and the Returns section, which costs a little efficiency but not comprehension.

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?

Covers the full call lifecycle for a 5-parameter, paid, open-world tool: input constraints, mutually exclusive parameters, duration and billing limits, the returned JSON field names per mode, and the timeout recovery path via get_sfx_task with the task_id. Even though an output schema exists, the description usefully flags that sfx_prompt is a single string rather than one per variation — a non-obvious asymmetry.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters5/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 0% and mode is an unconstrained anyOf string with no enum, so the description carries the full burden — and it does: it enumerates the mode values and their exact return fields, gives the 1-5 range and per-brief billing for variants_num, the 2000-character limit for prompt, the absolute/relative path resolution via SONILO_MCP_BASE_PATH for video_path, the HTTP(S) requirement for video_url, and the 'exactly one of' invariant.

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 and resource (analyze a video, return a creative brief) and immediately clarifies the negative scope: it generates no audio, video, or file. That negative framing is exactly what separates it from the video_to_* generation siblings, and the mode values make the three output shapes explicit.

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?

Names the trigger condition ('when the user does not know what music or sound effects the video should get') and the downstream action (feed a variation's prompt into video_to_music, video_to_sfx, video_to_sound, or the video-to-video counterparts). It also states the gating rule — only use when explicitly requested by the user — because of the cost warning.

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