Freebeat MCP Workflows
Use this skill for reliable Freebeat MCP task execution with correct tool order and async handling.
Quick Start
- Confirm the user goal:
generate_effect(template-based effect generation)generate_music_video(MV generation from uploaded audio)
- Gather required inputs.
- Execute the correct workflow.
- Poll task status until terminal state.
- Fetch result only after completion.
Tool Map
upload_audio: Upload local audio or import from URL. Returnsmusic_id.upload_image: Upload one or two images. Returnsimage_urls.list_effects: Discover templates and defaults for effect generation.generate_effect: Start async effect generation task.generate_music_video: Start async MV generation task.get_task_status: Poll async task state.get_task_result: Fetch output only when status iscompleted.
Workflow A: Generate Effect
Preferred order:
- Call
list_effects. - Select
effect_idand collect defaults:default_music_idimage_url(default image)
- Optional overrides:
- If user provides custom music, call
upload_audioand use returnedmusic_id. - If user provides custom image, call
upload_imagewith one image and useimage_urls[0].
- If user provides custom music, call
- Call
generate_effectwith:effect_id(required)music_id(required)prompt(required, trimmed length 1..2000)reference_image_urls(required, exactly one URL)watermark(optional, defaultfalse)
- Poll with
get_task_statusuntilcompletedorfailed. - On
completed, callget_task_resultand returnvideo_urlandcover_url.
Workflow B: Generate Music Video
Preferred order:
- Call
upload_audiofirst and capturemusic_id. - Optional image references:
- Call
upload_imageand pass returnedimage_urlstogenerate_music_video.reference_image_urls.
- Call
- Call
generate_music_videowith:music_id(required)prompt(required, trimmed length 1..2000)- Optional:
mv_type,style,aspect_ratio,resolution,watermark,start_ms,end_ms,reference_image_urls
- Poll with
get_task_statusuntil terminal state. - On
completed, callget_task_resultand returnvideo_urlandcover_url.
Async Handling Rules
- Treat task submission as asynchronous.
- Continue polling while status indicates in-progress work (for example
pending). - Status values may be lowercase (
pending,completed,failed) and some older systems may use uppercase variants. - Do not call
get_task_resultbefore status iscompleted. - If
get_task_resultreturnsTASK_NOT_COMPLETED, continue polling. - On
failed, reporterror_message,error_code, and any backend message from status response.
Input Validation Checklist
Before generation calls, verify:
- Prompt is present and trimmed length is within
1..2000. - For
generate_effect,reference_image_urlscontains exactly one image URL. - For
generate_effect,music_idis eitherdefault_music_idfromlist_effectsor fromupload_audio. - For
generate_music_video,music_idcomes fromupload_audio. - For
upload_audio, provide exactly one offile_pathorurl.
Response Format Guidelines
When reporting progress or final outputs, include:
- Task type (
effect_generationormusic_video_generation) task_id- Current status
- On completion:
video_urlandcover_url - On failure: failure code/message and next fix step
Defaults and Practical Guidance
- Use
list_effectsdefaults unless the user explicitly asks to override. - For effect generation, default image is
list_effects.image_url. - For MV generation, default values are acceptable unless user specifies otherwise.
- Keep polling cadence steady and avoid tight loops.
Example Decision Logic
If user asks "make an effect from template":
- Use Workflow A.
If user asks "make a music video from this song":
- Use Workflow B.
If user provides only a prompt without media:
- For effect: use
list_effectsdefaults. - For MV: request audio input (or URL) and run
upload_audiofirst.