clipswarm

v0.1.0
io.github.Shoberman2/clipswarm Checked 4 days ago Published 1 month ago

Clip YouTube videos and livestreams into viral 9:16 shorts, in parallel, for AI agents

These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.

get_video_info

Get a YouTube video's title, channel, duration, chapters and liveStatus ("is_live" means it's streaming now: clip it with times relative to "now"). Use chapters to find natural clip boundaries.

ParameterTypeDescription
url *stringYouTube URL

get_transcript

Get the timestamped transcript of a YouTube video. Optionally limit to a time window to keep output small. Read it to decide which moments to clip.

ParameterTypeDescription
url *string
fromstring | numberSeconds (83) or "1:23" / "1:02:03.5". Negative = from the end ("-0:30"). For LIVE streams: "now", negative offsets from the live edge (-90), or ISO time ("2026-10-08T00:40:00Z"); roughly the last hour…
langstringCaption language code, default "en"
tostring | numberSeconds (83) or "1:23" / "1:02:03.5". Negative = from the end ("-0:30"). For LIVE streams: "now", negative offsets from the live edge (-90), or ISO time ("2026-10-08T00:40:00Z"); roughly the last hour…

search_transcript

Find where a phrase is said in a YouTube video. Returns time windows with surrounding text, ready to pass to create_clips.

ParameterTypeDescription
query *stringWords to find (all must appear in the caption line)
url *string
contextSecnumberSeconds of padding around each hit, default 15
langstring
limitnumber

create_clips

Cut one or more clips from YouTube videos (including streams that are live right now) in parallel. Only the requested sections are downloaded. Jobs can span different videos. Returns a result per job; failures don't abort the batch. Live results include the wall-clock range covered. Viral clips take ~15-60s each; if the batch isn't done within waitSec, you get finished results plus a jobId: call get_clips with it until pending is 0.

ParameterTypeDescription
clips *array
outDirstringOutput directory, default /tmp/clips
waitSecnumberSeconds to wait before returning, default 40. If clips are still rendering, the response includes a jobId; collect the rest with get_clips.

get_clips

Get results of a create_clips batch that was still running (create_clips returns a jobId when it doesn't finish within waitSec). Waits up to waitSec for more clips to finish. Call repeatedly until pending is 0.

ParameterTypeDescription
jobId *string
waitSecnumberSeconds to wait for completion before returning, default 40

create_watch

Watch a category: on a schedule, search YouTube for new videos about it and auto-clip the best moments into viral shorts (moments and hooks picked by the local Claude Code CLI if installed, else YouTube's most-replayed peaks, else a transcript heuristic). Anything it can't clip (and live streams, if enabled) goes to the inbox for you. Replaces a watch with the same id. Runs via the background scheduler (see watch_scheduler).

ParameterTypeDescription
every *stringHow often to check: "30m", "6h", "1d" (min 5m)
query *stringThe category, phrased like a YouTube search, e.g. "netflix stock analysis"
autoClipbooleanDefault true. false = only collect videos into the inbox
clipSecondsnumberTarget clip length, default 45
clipsPerVideonumberDefault 2
idstringShort name; defaults to a slug of the query
includeLivebooleanAlso surface streams that are live right now
maxAgeHoursnumberOnly videos uploaded within this many hours (default 72)
maxDurationSecnumberDefault 14400
maxVideosPerRunnumberDefault 3
minDurationSecnumberDefault 120 (skips Shorts)
minViewsnumber
outDirstringDefault ~/clipswarm/<id>
pickerstringHow moments are chosen. Default "auto"
stylestring

list_watches

List watches with their schedule, last and next run, plus scheduler status.

delete_watch

Stop and remove a watch.

ParameterTypeDescription
id *string

run_watch

Run a watch right now instead of waiting for its schedule. Runs in the background (searching and rendering takes minutes); check get_inbox afterwards.

ParameterTypeDescription
id *string

get_inbox

Videos found by watches. "clipped" = auto-clipped (paths in clips; note says how moments were picked). "needs_agent" = couldn't be clipped automatically: read the transcript, pick moments, call create_clips, then mark it "done". "live" = streaming now. "failed" = see note.

ParameterTypeDescription
limitnumberMost recent N, default 30
statusstring
watchIdstring

update_inbox_item

Mark an inbox video as handled ("done") or not worth clipping ("dismissed").

ParameterTypeDescription
status *string
videoId *string
notestring

watch_scheduler

Status, install or uninstall the background job that runs due watches every 5 minutes (launchd on macOS; returns a crontab line elsewhere). Install only when the user wants watches to run automatically.

ParameterTypeDescription
action *string