Skip to main content
Glama

swap_clip

Replace a cutaway with a B-roll asset and re-render the video. Supports both local projects and hosted Swap & Refine timelines, where changes appear live in the editor.

Instructions

Replace one cutaway with a chosen B-roll asset (from suggest_clips), then re-render. LOCAL project (default): pass cut (0-based) + asset (filename) → re-renders locally, returns the MP4 path. HOSTED Swap & Refine project (pass job_id, or set VIRALSPIN_HOSTED_JOB_ID): pass segment_id + asset_url → patches the same timeline the browser editor shows and kicks off a cloud re-render; the change appears live in Swap & Refine. Returns immediately — the new preview lands on the project shortly.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
cutNoLOCAL: index of the cutaway to replace (0-based).
assetNoLOCAL: asset filename from suggest_clips (e.g. "v03.mp4" or "07.jpg").
job_idNoHOSTED: the Swap & Refine project. Omit to use VIRALSPIN_HOSTED_JOB_ID.
reasonNoHOSTED: optional one-line rationale for WHY this clip fits here (e.g. "the line says 'the day she arrived'"). Stored as provenance + shown on the timeline.
renderNoHOSTED: re-render now (costs a render/credits). Default false = instant timeline-only edit; iterate freely, then call render_project once to bake & publish.
asset_urlNoHOSTED: public URL of the replacement B-roll (from suggest_clips).
asset_kindNoHOSTED: optional — kind of the replacement asset.
segment_idNoHOSTED: the cutaway's segment id (from suggest_clips).
Behavior4/5

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

With no annotations, description carries full burden. It discloses async behavior ('Returns immediately'), render cost implication, hosted timeline syncing, and provenance storage. Minor conflict: opening says 'then re-render' but hosted mode defaults render=false; clarified later. Otherwise strong disclosure.

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?

Dense but structured with explicit LOCAL/HOSTED labels. Every sentence provides needed operational detail; no filler. Slightly long but warranted given two modes and 8 params.

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?

No output schema, so description should explain return/outcome. It states MP4 path for LOCAL and immediate return for HOSTED, but doesn't specify hosted return payload shape. Enough context for an agent to follow up with check_review_status. Overall complete for a complex tool.

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 baseline 3. Description adds value by grouping params into LOCAL/HOSTED sets, explaining conditional requirements (e.g., omit job_id to use env var), and linking asset/segment_id to suggest_clips output. Enhances schema 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?

Specific verb 'Replace' + resource 'cutaway' + asset source 'from suggest_clips'. Clearly distinguishes two operation modes (LOCAL vs HOSTED), making it distinct from siblings like swap_caption_style, trim_clip, render_project.

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?

Explicitly ties input params to project modes; names suggest_clips as prerequisite; tells when to use render_project for final render ('iterate freely, then call render_project once'). Gives clear decision path.

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/AI-Product-Allen-Yu/viralspin-mcp'

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