{"at":"2026-11-22T23:45:24.105Z","dir":"sent","era":"server_discover","message":{"id":1,"jsonrpc":"2.0","method":"server/discover","params":{"_meta":{"io.modelcontextprotocol/clientCapabilities":{},"io.modelcontextprotocol/clientInfo":{"name":"didrun-lab","version":"0.1.0"},"io.modelcontextprotocol/protocolVersion":"2026-07-28"}}}}
{"at":"2026-11-22T23:45:25.605Z","dir":"received","era":"server_discover","message":{"id":1,"jsonrpc":"2.0","result":{"_meta":{"io.modelcontextprotocol/serverInfo":{"name":"adanvil","version":"0.4.0"}},"cacheScope":"private","capabilities":{"prompts":{"listChanged":true},"resources":{"listChanged":true,"subscribe":true},"tools":{"listChanged":true}},"instructions":"Workflow for an AdAnvil editing agent:\n1. Onboard the brand and keep the open questions visible.\n2. Index the footage, then LOOK at the contact sheets before choosing clips.\n3. Annotate the useful entries and search the catalogue instead of rescanning folders.\n4. Decode the reference ad, then LOOK at its contact sheet and key moments.\n5. Pick a recipe and read its checklist before writing the storyboard.\n6. Write a storyboard using project-relative paths and the recipe structure.\n7. Preview captions on real frames and check the returned bbox and overflow.\n8. Validate the storyboard and fix errors before rendering.\n9. If the ad needs narration, queue voice_generate, read its manifest, and\n   align one or more shots to each line before adding voice_captions.\n   If the ad is a creator talking to camera, index the footage with speech\n   (library_index transcribes clips with sound), choose the takes with\n   speech_takes, cut with the clean_segments of speech_view, keep the creator's\n   own sound with audio.clips, cover cuts with audio_from, and caption with\n   speech_captions. Indexing transcribes fast (a small model) to make the\n   speech searchable: run speech_refine on the clips you choose before\n   captioning, and fix a last misheard word with speech_captions.corrections.\n10. Render a preview or final job, then run QC and LOOK at the returned images.\n11. Iterate on the storyboard when the images or report reveal a problem.\n12. Before delivery, run ad_score on the render (with its storyboard), LOOK at the safe zones\n    preview and the frame of each top finding, fix the findings by impact, render again and\n    aim for 80 or more. storyboard_validate(score_check=true) shows the cheap part earlier.\nBefore and after: rank every candidate pair (photos, a composite split with crop, frames of\nbefore/after clips) with compare_pair, LOOK at the previews and use the pair whose difference\nis obvious at a glance; a still pair of the same pose beats moving clips for a reveal.\nMusic: music_search finds tracks whose licence allows an ad (CC0, PDM, CC BY, CC BY-SA),\nmusic_fetch downloads one into music/ with its licence; the render warns music_licence_unknown\nor music_attribution_required (put the given text in the ad's description).\nSound design (optional): sfx_list(fetch=true) builds the CC0 sound pack in sfx/;\nadd {type: sfx, source, at, volume} overlays or audio.sfx_auto (cuts, captions);\nfor a music-led ad, music_beats shows the beats and storyboard_snap moves the\ncuts onto them (validation reports beat_alignment).\nVisual devices (optional, one or two per ad): a reveal segment (a divider sweeps a before\npicture away to show the after picture) or a split segment (two panels, labels) for honest\nbefore/after, a video overlay (picture-in-picture), sticker overlays (arrow, circle, underline,\nbadge, emoji, image), an image overlay as a card (animation, frame, rotate: a before/after photo\nor a review screenshot coming in over the video), an info_card overlay (AdAnvil draws an\ninformation card: one idea, a few words, one card at a time, coming in while the voice says it;\npause the captions meanwhile), a progress overlay and punch on a clip segment (instant zoom).\nFor an announcement, a lead collection or an offer ad that shows the product from the first\nsecond, set story to \"offer\" (product_too_early is then not checked).\nVoice lines marked suspect cannot be listened to by an agent: regenerate with\nslightly different wording, or accept the line when the transcript differs\nonly by punctuation. A line also turns suspect when 2 or more of its\n`unmatched_words` (words of 4+ letters not heard in the transcript) are\nmissing: reword those words and check the transcript.\nThe rules in docs/EDITING_GUIDE.md apply; retrieve them with editing_guide.\n","resultType":"complete","supportedVersions":["2026-07-28"],"ttlMs":0}}}
{"at":"2026-11-22T23:45:25.605Z","dir":"sent","era":"server_discover","message":{"id":2,"jsonrpc":"2.0","method":"tools/list","params":{"_meta":{"io.modelcontextprotocol/clientCapabilities":{},"io.modelcontextprotocol/protocolVersion":"2026-07-28"}}}}
{"at":"2026-11-22T23:45:25.608Z","dir":"received","era":"server_discover","message":{"id":2,"jsonrpc":"2.0","result":{"_meta":{"io.modelcontextprotocol/serverInfo":{"name":"adanvil","version":"0.4.0"}},"cacheScope":"private","resultType":"complete","tools":[{"description":"Create an AdAnvil project skeleton.\n\nUse this first for a new absolute project directory, then inspect the\nreturned folders before adding media.\n","inputSchema":{"properties":{"name":{"title":"Name","type":"string"},"project_dir":{"title":"Project Dir","type":"string"}},"required":["project_dir","name"],"title":"project_initArguments","type":"object"},"name":"project_init"},{"description":"Read a UTF-8 project text file using the project's safe path rules.\n\nOnly AdAnvil's own files can be read: ``adanvil.json``, ``brand.yaml``, ``catalog.json``\nand ``brand_brief.md`` at the top of the project, and the files under ``brand/``,\n``reference/``, ``renders/``, ``music/``, ``storyboards/``, ``exports/``, ``cache/``,\n``voice/``, ``sfx/`` and ``footage/`` (extensions .txt, .md, .json, .yaml, .yml, .csv).\nAny other file, and any name that starts with a dot, is refused. ``max_bytes`` (default\n65536) is capped at 1 MB; a larger value is clamped and the result ``note`` says so.\n","inputSchema":{"properties":{"max_bytes":{"default":65536,"title":"Max Bytes","type":"integer"},"path":{"title":"Path","type":"string"},"project_dir":{"title":"Project Dir","type":"string"}},"required":["project_dir","path"],"title":"project_read_textArguments","type":"object"},"name":"project_read_text"},{"description":"Run brand onboarding step one or two.\n\nUse without answers to discover site facts and questions, then call\nwith answers to write brand.yaml and brand_brief.md. Use open_questions\nto decide what the human must answer (a person whose consent is not yet\na yes or a no is listed as ``people.<id>.consent``). ``facts`` is a compact summary of\nthe site (title, colours, fonts, headings, prices, guarantee phrases,\na few products); the complete facts are saved in ``facts_file``\n(brand/site_facts.json): read it with project_read_text only when you\nneed more. ``more`` counts what the summary left out.\n","inputSchema":{"properties":{"answers":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"default":null,"title":"Answers"},"project_dir":{"title":"Project Dir","type":"string"},"url":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null,"title":"Url"}},"required":["project_dir"],"title":"brand_onboardArguments","type":"object"},"name":"brand_onboard"},{"description":"Read the current brand profile and brief.\n\nUse this before writing captions or storyboards so copy follows the\nbrand defaults and constraints. ``brand.product_versions`` says how to\ntell the product versions apart (match it with the ``product_version``\nannotation of library entries). ``brand.cta_image`` is the brand's\nready-made call-to-action image, to use as the last segment.\n``emoji_available`` lists the emoji characters of the brand's emoji\nfolder, or is \"all\" for twemoji (and empty for none).\n","inputSchema":{"properties":{"project_dir":{"title":"Project Dir","type":"string"}},"required":["project_dir"],"title":"brand_getArguments","type":"object"},"name":"brand_get"},{"description":"Index or refresh media under a project-relative folder or file.\n\nUse it before selection. ``source`` is a folder or a single media file.\nUp to 8 new or changed files are indexed in this call; more than 8 run\nas a detached job and the call returns at once with ``job_id`` (wait\nwith job_status(job_id, wait_seconds=90), progress is per file). The\nresult is compact: counts, one line per new or updated entry (id, path,\nduration, people, product_visible, ``speech`` when the clip speaks) and\nerrors. Contact sheets are not sent inline: use library_view, or\nlibrary_search with full=true for entries in full.\n\n``transcribe`` controls the speech of the clips: \"auto\" (default)\ntranscribes, with word timestamps, the clips that have an audio stream\nthat is not near-silent; true transcribes every clip with an audio\nstream; false does no speech work. It uses faster-whisper when\ninstalled, else the voice environment (adanvil voice-setup); with\nneither, entries get a clear ``speech`` status (\"unavailable: ...\") and\nindexing still succeeds. The model is ADANVIL_SPEECH_MODEL (default\nbase: fast, good enough to search) and the language is the brand\nlanguage, else auto-detected; the brand name, the product name and\n``speech.vocabulary`` of brand.yaml are given to the transcriber. The\nspeech of each file is saved as soon as that file is transcribed, so\nlibrary_search(text=...) works while the job runs (stage\n\"transcribing\"). Words are right about nine times in ten: run\nspeech_refine on the clips you will use before captioning. Audio files\n(.m4a, .wav, .mp3, .aac) are indexed as ``audio`` entries, with their\nspeech, and can be used as ``audio_from`` sources. A video whose sound\nis silent gets the speech status ``silent_audio`` and, when audio files\nwith a similar name are nearby, ``separate_audio_candidates``. The\nresult has a ``speech`` count by status.\n\n``vision`` controls the vision pass: with the vision environment\ninstalled (``adanvil vision-setup`` or the tool ``vision_setup``) each\nimage and video is also looked at (\"auto\", default): the frames of its\ncontact sheet are embedded (so ``library_search(query=...)`` can find\nshots by sentence) and searched for faces, the entry gets ``auto_tags``\n(zero-shot labels such as person, bathroom, smiling, never mixed with\nyour ``tags``) and, when ``brand.product_versions`` has reference\nphotos, a guess of the product version per shot. ``true`` redoes every\nentry; ``false`` skips the pass. Without the environment the result\nsays ``vision: {\"unavailable\": n}`` and indexing still succeeds.\n\nCuts: the scene change is scored on every frame (threshold 0.15), so\na jump cut between two takes of one person in the same room is a shot\nboundary (``library_view`` shows the shots; each entry keeps the\ndetector it was measured with as ``shots_detector``, for example\n``full@0.15``). A source above 1920 px is read at its keyframes only\n(``keyframes@0.3``): its cuts are only seen at keyframes, so look at\nits sheet. Catalogs made before 0.4.0 keep their old, coarser shots:\npass ``refresh_shots=true`` to measure the shots of the already\nindexed videos in ``source`` again (annotations, speech, vision and\nproduct versions stay as they are; the contact sheet is redrawn when\nthe shots changed, and the per-shot product guesses of such an entry\nare cleared, run vision=true to compute them again). The result\ncounts ``refreshed`` entries and ``shots_changed`` (the ones whose\nnumber of shots changed) and lists them under ``shots_refreshed``.\nDo it once per old catalog, before choosing segments: a segment\nplaced across a hidden cut shows a flash of another take\n(``storyboard_validate`` warns ``segment_crosses_cut``).\n","inputSchema":{"properties":{"project_dir":{"title":"Project Dir","type":"string"},"refresh_shots":{"default":false,"title":"Refresh Shots","type":"boolean"},"source":{"default":"footage","title":"Source","type":"string"},"transcribe":{"anyOf":[{"type":"boolean"},{"const":"auto","type":"string"}],"default":"auto","title":"Transcribe"},"vision":{"anyOf":[{"type":"boolean"},{"const":"auto","type":"string"}],"default":"auto","title":"Vision"}},"required":["project_dir"],"title":"library_indexArguments","type":"object"},"name":"library_index"},{"description":"Return one catalogue entry and its contact sheet.\n\nUse it when a summary identifies a candidate; LOOK at the image before\nchoosing a shot. An audio entry has no sheet: only its data is returned.\n","inputSchema":{"properties":{"entry_id":{"title":"Entry Id","type":"string"},"project_dir":{"title":"Project Dir","type":"string"}},"required":["project_dir","entry_id"],"title":"library_viewArguments","type":"object"},"name":"library_view"},{"description":"Merge annotations into one catalogue entry.\n\nParameters: ``project_dir`` (str, absolute project path), ``entry_id``\n(str, catalog entry id), ``description`` (str or null), ``tags``\n(list[str] or null), ``people`` (list[str] or null), ``product_visible``\n(bool or null), ``product_version`` (short free string such as\n``current``, ``old`` or ``v2``, or null), ``emotion`` (list of what the\nfaces express, a clip can show several: none, neutral, worried,\nfrustrated, sad, tired, closed, skeptical, shocked, curious, relaxed,\nhappy, satisfied; the same words as the breakdown, the segments and the\nsearch filter, anything else is refused; or null), ``quality`` (int 1-5 or null),\n``usable`` (list of ``[start, end, note]``, ``[start, end]``, or objects with ``start``,\n``end`` and ``note``; or null), ``notes`` (str or null), ``exclude``\n(bool or null), and ``exclude_reason`` (str or null).\n\nExample: ``library_annotate('/abs/project', 'clip-a1b2c3',\ntags=['hero'], quality=5, usable=[[1.2, 3.4, 'clear demo']])``.\nUse after looking at the contact sheet; search can then filter by tags,\npeople, product version, emotion, quality and exclusion.\n","inputSchema":{"properties":{"description":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null,"title":"Description"},"emotion":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"default":null,"title":"Emotion"},"entry_id":{"title":"Entry Id","type":"string"},"exclude":{"anyOf":[{"type":"boolean"},{"type":"null"}],"default":null,"title":"Exclude"},"exclude_reason":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null,"title":"Exclude Reason"},"notes":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null,"title":"Notes"},"people":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"default":null,"title":"People"},"product_version":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null,"title":"Product Version"},"product_visible":{"anyOf":[{"type":"boolean"},{"type":"null"}],"default":null,"title":"Product Visible"},"project_dir":{"title":"Project Dir","type":"string"},"quality":{"anyOf":[{"type":"integer"},{"type":"null"}],"default":null,"title":"Quality"},"tags":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"default":null,"title":"Tags"},"usable":{"anyOf":[{},{"type":"null"}],"default":null,"title":"Usable"}},"required":["project_dir","entry_id"],"title":"library_annotateArguments","type":"object"},"name":"library_annotate"},{"description":"Search indexed footage using annotations and technical metadata.\n\nUse the returned entries to choose clips without rescanning the\nfilesystem. Each result is one compact line (id, path, duration,\npeople, product_visible, version, emotion, quality); ``full=true`` returns\nthe entries in full. ``product_version`` and ``emotion`` (a list: every\nlisted emotion must be on the clip) filter on what was set with\nlibrary_annotate; without a human ``product_version`` annotation the\nguess made from the brand's reference photos is used (a human annotation\nalways wins). ``auto_tags`` filters on the automatic tags of the vision\npass (English labels such as ``bathroom`` or ``smiling``; common French,\nSpanish and German words are understood).\n\n``query`` searches by SENTENCE across the whole library, with no sheet\nto open: ``query=\"a woman with a sad face touching her jaw\"`` (any\nlanguage) ranks SHOTS by text-image similarity and returns the best\n``limit`` (default 12, at most 48) as ``results`` (entry, shot, start,\nend, time of the best frame, score) plus ONE mosaic image of those frames,\nnumbered like the list. All the other filters apply first. It needs the\nvision environment (``vision_setup``) and entries indexed with it\n(``library_index``); ``missing_vision`` counts the entries that have no\nvision data yet. Look at the mosaic, then library_view the entry to confirm\nbefore choosing. The score is a centred match probability: 0.5 and more is a\nclear match, under 0.1 means nothing in the library looks like it.\n","inputSchema":{"properties":{"auto_tags":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"default":null,"title":"Auto Tags"},"emotion":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"default":null,"title":"Emotion"},"full":{"default":false,"title":"Full","type":"boolean"},"include_excluded":{"default":false,"title":"Include Excluded","type":"boolean"},"kind":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null,"title":"Kind"},"limit":{"default":12,"title":"Limit","type":"integer"},"min_duration":{"anyOf":[{"type":"number"},{"type":"null"}],"default":null,"title":"Min Duration"},"min_quality":{"anyOf":[{"type":"integer"},{"type":"null"}],"default":null,"title":"Min Quality"},"people":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"default":null,"title":"People"},"product_version":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null,"title":"Product Version"},"product_visible":{"anyOf":[{"type":"boolean"},{"type":"null"}],"default":null,"title":"Product Visible"},"project_dir":{"title":"Project Dir","type":"string"},"query":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null,"title":"Query"},"tags":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"default":null,"title":"Tags"},"text":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null,"title":"Text"}},"required":["project_dir"],"title":"library_searchArguments","type":"object"},"name":"library_search"},{"description":"Install the optional vision environment (once, several minutes, about 2.5 GB).\n\nIt makes its own Python environment in the AdAnvil cache folder with a\nsmall multilingual image and text embedding model (SigLIP 2, Apache-2.0)\nand a face detector (YuNet, MIT), both free for commercial use, and\ndownloads their weights. It runs on the CPU. Afterwards ``library_index``\nalso looks at every image and video (shot search by sentence, automatic\ntags, product versions, faces for ``focus: \"face\"``). Without it\neverything else works as before. The environment is made from the\ndefault Python of this machine: to build it from another interpreter,\na person runs ``adanvil vision-setup --python <path>`` in a terminal.\n","inputSchema":{"properties":{},"title":"vision_setupArguments","type":"object"},"name":"vision_setup"},{"description":"Read the speech of one indexed clip and get safe cuts for it.\n\nPass ``entry_id`` (from library_index or library_search) or ``source`` (the\nproject-relative path of a video or audio file). Needs the clip to be indexed with\nspeech (library_index transcribes clips with sound). The output is compact:\n``phrases`` (split on pauses longer than ``max_pause`` seconds and on sentence\npunctuation), each with ``start``, ``end``, ``text`` and ``flags`` (``restart``: the\nnext phrase repeats it, a retake; ``filler``: it holds a hesitation; ``uncertain``:\nthe transcriber doubted a word, so it may be misheard); ``fillers`` (euh, heu, hum,\nbah, ben, um, uh, er, and genre, du coup, like when said alone between pauses; the\nlists can be replaced in brand.yaml under ``speech.fillers`` and\n``speech.isolated_fillers``); ``restarts`` (a phrase that repeats the start of the\nnext one: a retake inside the file); and ``clean_segments``: clip segments\n``{source, in, out}`` ready to paste into a storyboard, which keep the speech and drop\npauses over ``max_pause`` and the fillers (0.06 s kept before a word, 0.10 s after,\nnever cutting inside a word). Per-word data (start, end, text and ``filler`` for each\nword) only comes with ``words=true``. At most ``max_phrases`` phrases are returned\n(default 60) from ``first_phrase``: when there are more, ``note`` and\n``next_first_phrase`` tell how to get the next ones, and the other lists are those of\nthe phrases shown. With ``drop_restarts`` true the restart phrases are cut out of the\nclean segments too (they are only flagged by default, because a deliberate repetition\nlooks the same). ``model`` says which transcription model made the words: if a clip\nis used in the ad, run speech_refine on it first. A clip whose sound is silent says\n``speech_status: silent_audio`` and lists ``separate_audio_candidates``.\n","inputSchema":{"properties":{"drop_restarts":{"default":false,"title":"Drop Restarts","type":"boolean"},"entry_id":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null,"title":"Entry Id"},"first_phrase":{"default":0,"title":"First Phrase","type":"integer"},"max_pause":{"default":0.35,"title":"Max Pause","type":"number"},"max_phrases":{"default":60,"title":"Max Phrases","type":"integer"},"project_dir":{"title":"Project Dir","type":"string"},"source":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null,"title":"Source"},"words":{"default":false,"title":"Words","type":"boolean"}},"required":["project_dir"],"title":"speech_viewArguments","type":"object"},"name":"speech_view"},{"description":"Transcribe chosen clips again with a stronger model and replace their words.\n\nIndexing transcribes fast with a small model, so about one key word per line can be\nmisheard (names, numbers, rare words). Call this on the clips you will use in the ad\n(before cutting and captioning): ``sources`` lists project paths of indexed clips (a\nfile, or a folder for every clip below it) or catalogue entry ids. It starts a\ndetached job (wait with job_status(job_id, wait_seconds=90); progress counts clips)\nthat transcribes them with ``model`` (one of tiny, base, small, medium, large-v2,\nlarge-v3, large-v3-turbo; default medium: slower, much more accurate; a medium model\nneeds about 2 GB of memory) and the brand vocabulary (brand name,\nproduct name and ``speech.vocabulary`` of brand.yaml), then replaces the words of\neach clip in place (``speech_view`` reports the ``model``). A clip that fails keeps\nits previous words. The language is the brand's, else detected, unless ``language``\nis given. The result of the finished job is ``refine`` in job_status (refined ids,\nskipped clips with the reason, errors). A word that is still wrong afterwards can be\nshown correctly with ``speech_captions.corrections`` (close spellings only).\n","inputSchema":{"properties":{"language":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null,"title":"Language"},"model":{"default":"medium","enum":["tiny","base","small","medium","large-v2","large-v3","large-v3-turbo"],"title":"Model","type":"string"},"project_dir":{"title":"Project Dir","type":"string"},"sources":{"items":{"type":"string"},"title":"Sources","type":"array"}},"required":["project_dir","sources"],"title":"speech_refineArguments","type":"object"},"name":"speech_refine"},{"description":"Pick the best take of each line across several recordings of a script.\n\nPass ``source`` (a project folder such as footage/hooks, or one file) and/or\n``entry_ids``: the clips to compare, for example HOOK1.mov, HOOK1.1.mov and\nHOOK1.2.mov. Phrases that say the same line (normalised text similarity of at\nleast 0.6, inside one file or across files) form a line; each take is ranked on\nfluency (no filler, no restart), a complete ending (last word not cut), a speech\nrate in the natural band (about 1.9 to 4.2 words per second) and the audio level.\nReturns ``lines``: for each, the ``best`` take (entry_id, source, start, end,\ntext, score, ``why`` and ready-to-paste ``clean_segments``) and the ``others``\nwith the ``issues`` that put them behind. ``skipped`` lists clips without a\ntranscript (run library_index with transcribe=true on them).\n","inputSchema":{"properties":{"entry_ids":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"default":null,"title":"Entry Ids"},"max_pause":{"default":0.35,"title":"Max Pause","type":"number"},"project_dir":{"title":"Project Dir","type":"string"},"source":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null,"title":"Source"}},"required":["project_dir"],"title":"speech_takesArguments","type":"object"},"name":"speech_takes"},{"description":"Decode a reference video into shots, pacing, text, speech and sheets.\n\n``transcribe`` is true, false or \"auto\" (default: transcribe when the\nreference has audible sound and a transcriber is available). Returns\nthe JSON, the overview sheet, then up to 6 shot sheets (one row per\nshot, three frames each). LOOK at every shot sheet and read the\non-screen text, then call reference_breakdown with the filled\nbreakdown_template before choosing footage. The JSON is compact: the\nper-word transcript and rms_per_second stay in reference.json (see\n``files``); each shot has its ``spoken`` text and ``transcript_text``\nholds the whole transcript. ``breakdown_vocabularies`` lists the\nallowed type, scale, role, motion, emotion, text_speaker and text_device\nvalues and how to read who speaks in the on-screen text; ``music_profile`` is\nthe tempo and energy of the reference soundtrack (voice included).\n","inputSchema":{"properties":{"language":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null,"title":"Language"},"project_dir":{"title":"Project Dir","type":"string"},"transcribe":{"anyOf":[{"type":"boolean"},{"const":"auto","type":"string"}],"default":"auto","title":"Transcribe"},"video":{"title":"Video","type":"string"}},"required":["project_dir","video"],"title":"reference_decodeArguments","type":"object"},"name":"reference_decode"},{"description":"Save the agent's shot-by-shot breakdown of a decoded reference.\n\n``reference`` is the decode folder (reference/<slug>) or its\nreference.json. ``shots`` follows breakdown_template: one entry per\nshot, or one entry for consecutive shots (``\"shots\": [4, 5]``); every\ndecoded shot must be covered exactly once. Controlled values: type,\nscale, role, motion, emotion, text_speaker,\ntext_device (errors list the allowed ones); ``action`` is free short\ntext: what the person does (for example \"wipes the counter and sighs\"). For every\nshot note what the person feels (``emotion``) and does, then pick a\nlibrary shot with the same emotion and the same kind of action.\ntext_speaker and text_device say who speaks in the on-screen text (an\nemoji or name, \":\" and quotes is a character talking); subject is a\nshort id (person_a, product, diagram), on_screen_text is read verbatim,\nreplacement is a library entry id or \"missing: ...\". Returns type\ndemand, scale mix, role sequence, repeated patterns, people, text\nshots, text_devices, dialogue, emotion_by_role (the emotions used for each\nrole), pacing and missing shots. Use it before library_overview.\n","inputSchema":{"properties":{"project_dir":{"title":"Project Dir","type":"string"},"reference":{"title":"Reference","type":"string"},"shots":{"items":{"additionalProperties":true,"type":"object"},"title":"Shots","type":"array"}},"required":["project_dir","reference","shots"],"title":"reference_breakdownArguments","type":"object"},"name":"reference_breakdown"},{"description":"Overview of the footage folders without indexing, plus a mosaic.\n\nLists folders up to ``depth`` with file, video and image counts, total\nvideo seconds and first file names. With ``mosaic``, returns a labelled\nthumbnail mosaic of the media under ``path`` (48 per page, 6 columns);\n``pages`` tells how many, call again with ``page`` to see the next\nones. Run it on the whole footage\ntree (B-roll folders included) to find each shot type the reference\nbreakdown needs, before choosing shots.\n","inputSchema":{"properties":{"depth":{"default":2,"title":"Depth","type":"integer"},"mosaic":{"default":true,"title":"Mosaic","type":"boolean"},"page":{"default":1,"title":"Page","type":"integer"},"path":{"default":"footage","title":"Path","type":"string"},"project_dir":{"title":"Project Dir","type":"string"}},"required":["project_dir"],"title":"library_overviewArguments","type":"object"},"name":"library_overview"},{"description":"Extract one full-resolution frame from a project video or image.\n\nGive the time ``t`` (seconds) or the frame number ``frame`` (video only, counted from\n0). Returns the frame ON SCREEN at ``t`` (``floor(t * fps)``): at 2.87 s of a 30 fps\nvideo that is the frame starting at 2.867 s, not the next one at 2.900 s. A ``t``\nwithin 1 ms of a frame boundary is that frame (10.9333 s at 30 fps is frame 328), so a\ntime printed to four decimals lands on the right frame. ``frame_t`` is the frame's exact\nstart time and ``frame`` its number (video only). Use it to inspect the exact moment\nbehind a timecode; the saved frame is under cache/frames/.\n","inputSchema":{"properties":{"frame":{"anyOf":[{"type":"integer"},{"type":"null"}],"default":null,"title":"Frame"},"project_dir":{"title":"Project Dir","type":"string"},"source":{"title":"Source","type":"string"},"t":{"anyOf":[{"type":"number"},{"type":"null"}],"default":null,"title":"T"}},"required":["project_dir","source"],"title":"frame_viewArguments","type":"object"},"name":"frame_view"},{"description":"Export a storyboard as an editable timeline for DaVinci Resolve or Premiere Pro.\n\nWrites ``exports/<name>/`` with ``<name>.otio`` (OpenTimelineIO: video tracks, speed as\na time warp, stills, captions as markers on V1, overlay pictures, voice, music and one\naudio track per sound effect), ``<name>.xml`` (Final Cut Pro 7 XML, read by Premiere\nPro and Resolve, with the real rate, size and duration of each source, speed as Time\nRemap, music and sound effect levels and fades), ``<name>.edl`` (CMX 3600, video cuts\nonly, the fallback), ``<name>.srt`` (every caption at its final time), ``overlays/``\n(each caption, sticker and card as a full-canvas transparent PNG named after its\nstoryboard overlay index, with its place in ``overlays.json``) and ``README.txt``.\n``formats`` is any of ``otio``, ``fcp7xml``, ``edl``, ``srt`` (all by default). Media\npaths are absolute, as the project sees them; ``relative`` writes\n``exports/<name>-relative/`` with paths relative to the folder (and a ``relink.txt``),\n``copy_media`` writes ``exports/<name>-portable/`` with the used sources copied into\n``media/``; ``media_root`` is the absolute folder a relative export will live in. A\nfolder that holds an export of another media mode is only replaced with\n``overwrite=true``. The result lists ``warnings`` (what is approximated) and\n``not_exported`` (what no editor format here carries: grading, reframing, pop\nanimations, split layout, loudness, the EDL audio).\n","inputSchema":{"properties":{"copy_media":{"default":false,"title":"Copy Media","type":"boolean"},"formats":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"default":null,"title":"Formats"},"media_root":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null,"title":"Media Root"},"overwrite":{"default":false,"title":"Overwrite","type":"boolean"},"project_dir":{"title":"Project Dir","type":"string"},"relative":{"default":false,"title":"Relative","type":"boolean"},"storyboard":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"string"}],"title":"Storyboard"}},"required":["project_dir","storyboard"],"title":"timeline_exportArguments","type":"object"},"name":"timeline_export"},{"description":"List available ad recipes with purpose and duration.\n\nUse this to shortlist a shape, then read its checklist with recipe_get\nbefore writing a storyboard.\n","inputSchema":{"properties":{},"title":"recipe_listArguments","type":"object"},"name":"recipe_list"},{"description":"Return one complete recipe, including rules and example.\n\nUse its checklist as the storyboard acceptance criteria.\n","inputSchema":{"properties":{"recipe_id":{"title":"Recipe Id","type":"string"}},"required":["recipe_id"],"title":"recipe_getArguments","type":"object"},"name":"recipe_get"},{"description":"Return the editing doctrine for footage, copy, rendering and QC.\n\nRead it before the first storyboard and whenever a rule is unclear.\n","inputSchema":{"properties":{},"title":"editing_guideArguments","type":"object"},"name":"editing_guide"},{"description":"Return the JSON Schema for Storyboard v1.\n\nUse it to construct agent-authored storyboards before validation.\n","inputSchema":{"properties":{},"title":"storyboard_schemaArguments","type":"object"},"name":"storyboard_schema"},{"description":"Save a storyboard in the project as ``storyboards/<name>.json`` and return its path.\n\nSend the storyboard object once, then pass the returned path\n(``\"storyboards/<name>.json\"``) as ``storyboard`` to ``storyboard_validate``,\n``render_start`` and ``caption_preview`` instead of repeating the whole object\n(useful on a remote server). Saving again under the same name replaces the file.\nThe object is stored as sent, not validated: ``storyboard_validate`` checks it.\n","inputSchema":{"properties":{"name":{"title":"Name","type":"string"},"project_dir":{"title":"Project Dir","type":"string"},"storyboard":{"additionalProperties":true,"title":"Storyboard","type":"object"}},"required":["project_dir","storyboard","name"],"title":"storyboard_saveArguments","type":"object"},"name":"storyboard_save"},{"description":"Edit a saved storyboard in place: ``changes`` is a list of ``{path, value}``.\n\nA path walks the JSON with dots and indexes: ``segments.3.out`` (``segments[3].out``\nworks too). Setting a missing key of an object adds it; the index just past the end of\na list, or ``-``, appends; ``{\"path\": \"overlays.1\", \"remove\": true}`` deletes. The\nchanges apply in order to a copy: if one is wrong, nothing is saved and the error\nnames it. When the changes rename the storyboard (``name``), its ``output.path`` follows\nif it was the default of the old name (a path set by hand stays). The file\n``storyboards/<name>.json`` is rewritten and the result lists the\nschema problems left (``problems``, empty when the storyboard is valid; run\n``storyboard_validate`` for the full check).\n","inputSchema":{"properties":{"changes":{"items":{"additionalProperties":true,"type":"object"},"title":"Changes","type":"array"},"name":{"title":"Name","type":"string"},"project_dir":{"title":"Project Dir","type":"string"}},"required":["project_dir","name","changes"],"title":"storyboard_patchArguments","type":"object"},"name":"storyboard_patch"},{"description":"Render a caption, a comment or an information card over a real 9:16 frame.\n\nAn ``info_card`` overlay (see the storyboard schema) is drawn, settled, as the render\ndraws it: the result has its image on the real frame, its ``bbox`` (inside the frame\nwhen it fits), ``size_used`` (the title size), ``overflow`` and ``lines``. A banned word\nof the brand in its texts is an error.\n\nUse it before rendering to inspect placement; the JSON reports bbox,\nfitted size, overflow and final lines. ``emoji`` takes the storyboard\n``emoji`` values (twemoji, none or a project folder) so the preview\nmatches the render; ``emoji_missing`` lists emoji absent from a folder.\nFor a ``voice_captions`` overlay pass ``manifest``: the ``audio.voice``\npath of your storyboard (voice/<name>/manifest.json); ``expanded``\nlists the resulting captions once. A ``speech_captions`` overlay is\nbuilt from the speech of the clips: pass ``chunk_index`` to pick the\ncaption to draw and ``storyboard`` (a project path such as\n``storyboards/<name>.json`` or the object) so the timeline is the one of\nyour ad; without it the captions are those of ``source`` played whole.\n``expanded`` lists them all. With ``start``/``end`` on a ``voice_captions`` or\n``speech_captions`` overlay only the captions inside that window exist (``chunk_index``\ncounts those); a voice preview takes its offset from the overlay (``offset``), not from\nthe storyboard. An animated caption (``animation``\n``karaoke``, ``word`` or ``pop``) is drawn in one of its states, to check\nwhere the highlight lands: put ``chunk_index`` and ``word_index`` in the\noverlay object to pick the chunk and the lit word, or leave them out to\nget the state on screen at timeline time ``t``. The result names the\n``word_index``, the ``window`` of the state and how many ``states`` the\nchunk has.\n","inputSchema":{"properties":{"emoji":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null,"title":"Emoji"},"overlay":{"additionalProperties":true,"title":"Overlay","type":"object"},"project_dir":{"title":"Project Dir","type":"string"},"source":{"title":"Source","type":"string"},"storyboard":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"string"},{"type":"null"}],"default":null,"title":"Storyboard"},"t":{"title":"T","type":"number"}},"required":["project_dir","source","t","overlay"],"title":"caption_previewArguments","type":"object"},"name":"caption_preview"},{"description":"Compose a clean end card image from a real product photo.\n\nUse it only when the brand has no ready-made call-to-action image: when\nit has one (``brand.cta_image``, a ``cta/`` folder or ``brand/``),\nuse that image as the last segment (``image``, ``zoom_in``, about 3 s)\ninstead. It writes\n``brand/endcards/<name>.png`` (1080x1920 unless ``spec.format`` says\notherwise) and returns the path, the layout boxes and the image: LOOK at\nit. ``spec``: ``product_image`` (project path of a photo or a video, with\n``t`` for the frame, optional ``crop`` {x,y,w,h} in the source's display\npixels, before scaling: on a 1920x1080 frame ``{\"x\": 600, \"y\": 100,\n\"w\": 700, \"h\": 700}`` keeps a 700 px square; the result returns\n``source_size`` [w, h] to measure it), ``pill``, ``title``\n(a string or runs ``{text, accent}``), ``subline``, ``badges`` (up to 3,\n``{text, icon: check|star|none}``), ``button`` (``{text, arrow:\ndown|right|none}``), colours ``accent``, ``text``, ``muted``,\n``background`` (two colours), ``family``, ``emoji``. Colours default to\nthe brand's. Banned words of the brand on any text are an error. Use the\nPNG as the last segment: ``type: image``, ``motion: zoom_in``, about 3 s,\nlabel ``end_card``, no subtitles on it. It also writes\n``brand/endcards/<name>.png.json``, the texts drawn (pill, title,\nsubline, badges, button): ``storyboard_validate`` reads it, so\n``cta_text_missing`` is not raised when the button already says the\nbrand's call to action.\n","inputSchema":{"properties":{"name":{"title":"Name","type":"string"},"project_dir":{"title":"Project Dir","type":"string"},"spec":{"additionalProperties":true,"title":"Spec","type":"object"}},"required":["project_dir","spec","name"],"title":"end_cardArguments","type":"object"},"name":"end_card"},{"description":"Validate a storyboard object or project-relative JSON file.\n\n``storyboard`` is the object, or the path saved by ``storyboard_save``\n(``\"storyboards/<name>.json\"``). Every schema error is reported at once.\n\nThe check covers Storyboard v1, its files, brand and recipe. Fix every\nerror path before render_start; warnings are questions to review. With\n``reference`` set, ``ref_*`` warnings and a ``reference_comparison``\nblock compare the edit with the reference breakdown. With\n``score_check=true`` it also runs the quick pre-check of ``ad_score``\nthat needs no pixels, as warnings prefixed ``score_`` (reading time and\nline length, product too early, call to action, platform safe zones of\nthe overlays); ``summary.score_precheck`` lists what passed and what\ncould not be checked.\n\nWarning ``segment_crosses_cut``: a clip segment (or the clip side of a\n``split`` panel or a ``reveal``) whose source is indexed has a change of\ntake (a shot boundary of ``library_view``) strictly inside its range, more\nthan 0.12 s from each end as the viewer sees it (``speed`` counts). The\nviewer would see a flash of another take, or a jump in the middle of the\nshot: move ``in`` after the cut or ``out`` before it, as the message\nsays. ``summary.cut_check`` counts the segments checked and the ones that\ncross a cut, and lists under ``old_shots`` the sources measured before\n0.4.0, whose shots can hide cuts. Sources that are not indexed, or have\none shot, say nothing; run ``library_index`` (``refresh_shots=true`` for\ncatalogs made before 0.4.0) so that the cuts of long clips are known.\n``cta_text_missing`` also reads the texts of an end card made with\n``end_card`` when it is the last segment, and those of ``info_card`` overlays.\n\nInformation cards (``info_card`` overlays): each is drawn and checked. Error\n``info_card_out_of_frame`` (the card leaves the frame), ``banned_word`` in its texts;\nwarnings ``info_card_overlap`` (two cards on screen together: show one at a time),\n``caption_over_info_card`` (a caption overlaps a card while both are on screen: pause\nthe captions with ``start``/``end``), ``text_overflow`` (the title does not fit at its\nsmallest size) and ``emphasis_unmatched``. With ``story: \"offer\"`` (announcements, lead\ncollection, offers where the product is in hand from the first second)\n``product_too_early`` is not raised, and ``summary.skipped`` says so.\n","inputSchema":{"properties":{"project_dir":{"title":"Project Dir","type":"string"},"recipe_id":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null,"title":"Recipe Id"},"score_check":{"default":false,"title":"Score Check","type":"boolean"},"storyboard":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"string"}],"title":"Storyboard"}},"required":["project_dir","storyboard"],"title":"storyboard_validateArguments","type":"object"},"name":"storyboard_validate"},{"description":"Validate and queue a background render.\n\n``storyboard`` is the object or a saved path (``\"storyboards/<name>.json\"``).\n\nUse preview while iterating and final after QC. A rejected storyboard\nreturns validation errors and creates no job.\n","inputSchema":{"properties":{"project_dir":{"title":"Project Dir","type":"string"},"quality":{"default":"final","enum":["final","preview","draft"],"title":"Quality","type":"string"},"storyboard":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"string"}],"title":"Storyboard"}},"required":["project_dir","storyboard"],"title":"render_startArguments","type":"object"},"name":"render_start"},{"description":"Build the matrix of variants of one storyboard: hooks x bodies x calls to action.\n\n``base`` is a storyboard (object or ``\"storyboards/<name>.json\"``). ``variants`` is\n``{axis: [{id, changes}]}`` for up to 3 axes (for example ``hook``, ``body``, ``cta``).\n``changes`` is a list applied in order, each a ``storyboard_patch`` change (``{path,\nvalue}`` or ``{path, remove: true}``) or a SLOT REPLACEMENT ``{replace_label: \"hook\",\nsegments: [...], overlays: [...]}``: it swaps every segment of that label (they must be\nnext to each other) and shifts everything after it by the difference of duration\n(overlays, sounds and word times follow). The new ``overlays`` are timed from the start\nof the slot; the overlays that were on the replaced segments go away. A voice-over\n(``audio.voice``) laid on the timeline must still match: a change of duration while one\nis set is refused with the reason, as is an overlay that only partly overlaps the slot.\nAn option with no ``changes`` (or ``[]``) is the control: the base unchanged. Timed\nsounds follow the slot: an ``sfx`` overlay after it shifts by the difference of duration,\none inside it goes away when the new slot brings its own sounds (else it keeps its\noffset); each variant lists what moved under ``moved``. All the errors of all the\nvariants come back at once (variant, path, message).\n\nMakes the cartesian product (at most 24, each validated), saves each as\n``storyboards/<name>.json`` (``name_pattern`` uses ``{base}`` and the axis names; the\ndefault falls back to the axis ids in order when an axis is not hook or cta) and returns\nthe list with the path, ids, duration and warnings of each, plus a contact sheet: the\nfirst 3 s (top row) and the last 3 s (bottom row, the call to action) of every variant\n(LOOK at it, a hook that does not read at that size will not read in the feed). A base\nthat is itself a variant keeps its ids in the new ones (the manifest keeps\n``hook=h2;cta=ca``). Then ``render_batch`` renders them with a shared cache.\nVary the hook first; keep everything else identical.\n\nA storyboard file that already exists is NEVER overwritten, whoever made it (an earlier\n``variants_build`` included, or a file edited by hand since): the error lists every file\nthat would be replaced. ``overwrite=true`` replaces them all. Renders may be replaced;\nstoryboards may not.\n","inputSchema":{"properties":{"base":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"string"}],"title":"Base"},"contact_sheet":{"default":true,"title":"Contact Sheet","type":"boolean"},"name_pattern":{"default":"{base}_{hook}_{cta}","title":"Name Pattern","type":"string"},"overwrite":{"default":false,"title":"Overwrite","type":"boolean"},"project_dir":{"title":"Project Dir","type":"string"},"variants":{"additionalProperties":true,"title":"Variants","type":"object"}},"required":["project_dir","base","variants"],"title":"variants_buildArguments","type":"object"},"name":"variants_build"},{"description":"Queue ONE background job that renders several storyboards in order.\n\n``quality``: ``final``, ``preview`` or ``draft`` (an alias of ``preview``: half-size\n``*.preview.mp4`` files; the report and the manifest say ``preview``, and the manifest\nhas a ``quality`` column because a preview scores lower than its final).\n\n``storyboards``: objects or saved paths (typically the variants of\n``variants_build``). The segment cache is shared, so a segment used by several variants\n(the body, the end card) is built once: the first render is the slow one. ``formats``\n(any of ``\"9:16\"``, ``\"4:5\"``, ``\"1:1\"``) renders each storyboard in those ratios; when\nomitted each storyboard's own ``formats`` field is used, else it renders as it is. Files\ngo to ``renders/<batch>/`` (``batch`` defaults to ``<first name>_batch``) named\n``<name>[_9x16|_4x5|_1x1].mp4``, and ``renders/<batch>/manifest.csv`` lists them for an\nads manager (file, variant ids, format, duration, score, hook text, CTA text).\n``score`` runs ``ad_score`` on each final render for the manifest (with the safe zones of\nits placement). ``job_status`` shows the progress per render, each output as it\nfinishes, and at the end ``total_seconds``, ``cache_builds`` and the manifest path. A\nstoryboard that does not validate rejects the whole batch with its errors and no job.\n","inputSchema":{"properties":{"batch":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null,"title":"Batch"},"formats":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"default":null,"title":"Formats"},"project_dir":{"title":"Project Dir","type":"string"},"quality":{"default":"final","enum":["final","preview","draft"],"title":"Quality","type":"string"},"score":{"default":true,"title":"Score","type":"boolean"},"storyboards":{"items":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"string"}]},"title":"Storyboards","type":"array"}},"required":["project_dir","storyboards"],"title":"render_batchArguments","type":"object"},"name":"render_batch"},{"description":"Render one storyboard in several formats: ``9:16``, ``4:5``, ``1:1``.\n\n``formats`` defaults to the storyboard's own ``formats`` field, else all three. One\ndetached job (see ``render_batch``), one file per format: ``<name>_9x16.mp4``,\n``<name>_4x5.mp4``, ``<name>_1x1.mp4`` in ``renders/<batch>/`` (``batch`` defaults to\n``<name>_formats``). Each is the same ad laid out for its placement: the footage is\nre-cropped (face-aware with ``focus: \"face\"``, else by ``focus``); a still or an end card\nthat does not fit is shown whole over its blurred copy; captions, stickers and images\nkeep their place by bands (the part the platform leaves free is mapped onto the free part\nof the new frame, 4:5 and 1:1 being the Feed) and are pushed back inside when a block\nwould leave it. An ``info_card`` is placed like an image card: its ``y`` follows the same\nbands, its width and text scale with the frame (the title stays at 38 px or more) and it\nstays inside the frame. ``ad_score`` uses the safe zones of the matching placement\n(``feed`` for 4:5 and 1:1). LOOK at each format's contact sheet before delivery.\n","inputSchema":{"properties":{"batch":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null,"title":"Batch"},"formats":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"default":null,"title":"Formats"},"project_dir":{"title":"Project Dir","type":"string"},"quality":{"default":"final","enum":["final","preview","draft"],"title":"Quality","type":"string"},"score":{"default":true,"title":"Score","type":"boolean"},"storyboard":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"string"}],"title":"Storyboard"}},"required":["project_dir","storyboard"],"title":"render_formatsArguments","type":"object"},"name":"render_formats"},{"description":"Queue a checked voice-over generation job.\n\nPoll job_status until it is done, then use each manifest line's\n``start`` and ``duration`` to place shots. If a line is ``suspect``,\nregenerate it with slightly different wording or accept it when the\ntranscript differs only by punctuation; agents cannot listen to audio.\n``unmatched_words`` lists the key words (4+ letters) missing from the\ntranscript: two or more make the line suspect, so reword them.\nWhen the voice says the end of a line again (2 or more extra words after the whole\ntext) the audio is cut after the last expected word: the line has ``extra_words`` and\n``trimmed_extra: true``; extra words that could not be cut make it ``suspect``.\nA line is a string (said and shown) or ``{\"say\": ..., \"show\": ...}``\nwhen captions must display something other than the spoken words\n(say \"forty-nine dollars ninety\", show \"$49.90\"). Calling again with an\nexisting ``name`` replaces that voice (unchanged lines come from the\ncache); the job summary then has ``replaced: true``. ``language`` in the\nspec is optional: without it the ``language`` of brand.yaml is used,\nelse ``en``.\n","inputSchema":{"properties":{"name":{"title":"Name","type":"string"},"project_dir":{"title":"Project Dir","type":"string"},"spec":{"additionalProperties":true,"title":"Spec","type":"object"}},"required":["project_dir","name","spec"],"title":"voice_generateArguments","type":"object"},"name":"voice_generate"},{"description":"List the sound effects of the project's ``sfx/`` folder, and build the pack.\n\n``fetch=true`` first builds the missing sounds of the pack (about 18: whoosh short and\nlong, swoosh, swipe, pop, click, tap, ding, chime, notification, cash register,\ncamera shutter, record scratch, typing, riser 1 s and 2 s, impact, boom). Each is\ndownloaded from a pinned CC0 source (checked by SHA-1) or synthesised in code, trimmed\nand set to one level, with the source and licence in ``sfx/LICENCES.txt``. A download\nthat fails is synthesised instead (``offline=true`` synthesises all of them). The\nfiles you drop in ``sfx/`` yourself are listed too. Each sound returns its ``name``,\n``path`` (the ``source`` of an ``sfx`` overlay), ``duration`` and ``origin``. Use a\nsound in an ``sfx`` overlay (``{\"type\": \"sfx\", \"source\": \"sfx/pop.wav\", \"at\": 3.2,\n\"volume\": 0.8}``) or by name in ``audio.sfx_auto``. A riser is placed so that its end\nmeets the moment it builds towards: ``at`` = that moment minus its duration.\n","inputSchema":{"properties":{"fetch":{"default":false,"title":"Fetch","type":"boolean"},"offline":{"default":false,"title":"Offline","type":"boolean"},"project_dir":{"title":"Project Dir","type":"string"}},"required":["project_dir"],"title":"sfx_listArguments","type":"object"},"name":"sfx_list"},{"description":"Beat times of a music track, as it will play in the ad.\n\n``path`` is a project file (audio, or a video whose soundtrack is the music). ``start``\nis the storyboard's ``audio.start``: the times are in seconds from the start of the\nad, so beat 0 of the result is the first beat heard. They come from the onset envelope\nand the estimated tempo, on a regular grid whose phase is aligned to the strongest\nonsets (within a few milliseconds on a steady beat). ``duration`` limits the analysis\n(default the first 120 s). A track without a steady beat (a piano, a pad) returns no\nbeats. Cut on these times for a music-led ad, or let ``storyboard_snap`` do it.\n","inputSchema":{"properties":{"duration":{"anyOf":[{"type":"number"},{"type":"null"}],"default":null,"title":"Duration"},"path":{"title":"Path","type":"string"},"project_dir":{"title":"Project Dir","type":"string"},"start":{"default":0.0,"title":"Start","type":"number"}},"required":["project_dir","path"],"title":"music_beatsArguments","type":"object"},"name":"music_beats"},{"description":"Move the cuts of a storyboard onto the beats of its music.\n\n``storyboard`` is the object or a saved path. Each cut within ``max_shift`` seconds\n(default 0.2) of a beat of ``audio.music`` (from ``audio.start``) moves to it: the\n``out`` of the earlier clip (or the ``duration`` of an image) changes, ``in`` points and\nsegment order never do, no segment ends up under 0.5 s (or shorter than it was), the\nother cuts and the total duration stay, and the captions, images and sounds that\nstarted on a moved cut move with it. With ``audio.clips`` the cuts of talking segments\nnever move. The result lists ``moves``, the cuts ``kept`` with the reason, and how many\ncuts are on a beat before and after. It returns the new ``storyboard``, or with\n``save_as`` (a name) writes ``storyboards/<name>.json`` and returns its path instead.\nThe snapped storyboard has its own identity so a render never overwrites the original:\nwith ``save_as`` its ``name`` is ``save_as``, without it the old name plus ``_snapped``,\nand ``output.path`` is ``renders/<that name>.mp4`` (the quality is kept).\nRun ``storyboard_validate`` afterwards: its ``beat_alignment`` info shows the share of\ncuts on a beat.\n","inputSchema":{"properties":{"max_shift":{"default":0.2,"title":"Max Shift","type":"number"},"project_dir":{"title":"Project Dir","type":"string"},"save_as":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null,"title":"Save As"},"storyboard":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"string"}],"title":"Storyboard"},"to":{"const":"beats","default":"beats","title":"To","type":"string"}},"required":["project_dir","storyboard"],"title":"storyboard_snapArguments","type":"object"},"name":"storyboard_snap"},{"description":"Tempo, loudness and energy of the music tracks, to match a reference.\n\nWithout ``path``, profiles every audio file of ``music/``; with ``path``\n(project-relative), one file, which may be a video such as the reference\n(its soundtrack mixes voice and music). Each track returns its duration,\nintegrated loudness (LUFS), estimated tempo (``tempo_bpm``), ``energy``\n(onsets per second and loudness range in LU) and ``feel``: calm, medium or\nenergetic (thresholds in ``feel_thresholds``). Pick the library track whose\nprofile is closest to the reference's: a calm track under a fast reference\nfeels flat.\n","inputSchema":{"properties":{"path":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null,"title":"Path"},"project_dir":{"title":"Project Dir","type":"string"}},"required":["project_dir"],"title":"music_profileArguments","type":"object"},"name":"music_profile"},{"description":"Find music whose licence lets an ad use it (commercial use and modification).\n\nSearches Openverse (no key; ``source=\"openverse\"``), Freesound (``\"freesound\"``, only with\nthe ``FREESOUND_API_KEY`` environment variable) or both (``\"all\"``; without the key the\nanswer says so and still lists Openverse). Kept licences: CC0, PDM, CC BY, CC BY-SA;\nNC and ND are dropped. Each track returns ``source``, ``id``, ``title``, ``author``,\n``licence``, ``duration`` (s), ``source_url``, ``preview_url`` (listen before fetching)\nand ``attribution_required`` (with the ``attribution_text`` to put in the ad's\ndescription). ``mood`` adds words to the query (\"calm\", \"upbeat\"). ``min_duration`` and\n``max_duration`` filter in seconds. ``fit_to=\"storyboard\"`` with ``storyboard`` (a\nproject path such as ``storyboards/summer.json``) ranks for that ad: tracks at least as\nlong as the ad first, then the wanted feel (``audio.music_feel``, or the ``feel`` argument:\ncalm, medium, energetic) against ``fit.feel_guess``, a guess from the track's OWN title,\ntags and genres (``unknown`` when they say nothing; never copied from the wanted feel).\nThe real feel, tempo and loudness come from ``music_fetch``: trust that, not the guess.\nFetch the best ones, listen, and choose.\n","inputSchema":{"properties":{"feel":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null,"title":"Feel"},"fit_to":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null,"title":"Fit To"},"limit":{"default":12,"title":"Limit","type":"integer"},"max_duration":{"anyOf":[{"type":"number"},{"type":"null"}],"default":null,"title":"Max Duration"},"min_duration":{"anyOf":[{"type":"number"},{"type":"null"}],"default":null,"title":"Min Duration"},"mood":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null,"title":"Mood"},"project_dir":{"title":"Project Dir","type":"string"},"query":{"title":"Query","type":"string"},"source":{"default":"openverse","title":"Source","type":"string"},"storyboard":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null,"title":"Storyboard"}},"required":["project_dir","query"],"title":"music_searchArguments","type":"object"},"name":"music_search"},{"description":"Download a track from ``music_search`` into ``music/``, with its licence.\n\n``source`` and ``id`` come from the search result. Writes ``music/<file>``, the record\n``music/<file>.licence.json`` (source, id, URL, title, author, licence, licence URL,\nattribution text, fetch date) and a line in ``music/LICENCES.txt``, then profiles the\ntrack: the answer has ``path`` (the ``audio.music`` value), ``duration``, ``tempo_bpm``,\n``feel`` and ``loudness_lufs``. A licence that is not CC0, PDM, CC BY or CC BY-SA is\nrefused. An embedded cover picture is removed from the stored file. The render and\n``ad_score`` read the record (the sidecar, else the track's line in ``LICENCES.txt``):\n``music_licence_unknown`` when a track has neither,\n``music_attribution_required`` (with the exact text) when it needs one.\nFreesound serves its high-quality MP3 preview (the original needs a login).\n","inputSchema":{"properties":{"id":{"title":"Id","type":"string"},"project_dir":{"title":"Project Dir","type":"string"},"source":{"title":"Source","type":"string"}},"required":["project_dir","source","id"],"title":"music_fetchArguments","type":"object"},"name":"music_fetch"},{"description":"Make an instrumental track locally (optional ACE-Step environment), as a job.\n\nNeeds ``adanvil music-setup`` (about 3 GB of packages, then 8 GB of weights at the first\nrun). ``prompt`` is a list of tags (\"upbeat acoustic guitar, warm, 110 bpm,\ninstrumental\"); ``duration`` 10 to 120 s. On a CPU a 30 s track takes several minutes:\npoll ``job_status``; its ``music`` field has the ``path`` (the ``audio.music`` value),\ntempo, feel and loudness. The model and its weights are Apache-2.0: no attribution; the\nlicence record is written next to the file like for a fetched track.\n","inputSchema":{"properties":{"duration":{"default":30.0,"title":"Duration","type":"number"},"project_dir":{"title":"Project Dir","type":"string"},"prompt":{"title":"Prompt","type":"string"},"seed":{"anyOf":[{"type":"integer"},{"type":"null"}],"default":null,"title":"Seed"},"steps":{"default":27,"title":"Steps","type":"integer"}},"required":["project_dir","prompt"],"title":"music_generateArguments","type":"object"},"name":"music_generate"},{"description":"Read a voice manifest and suggest final-timeline shot boundaries.\n\n``offset`` is the intended voice start on the final video timeline.\nSuspect lines should be regenerated with slightly different wording\nor accepted only when the transcript difference is punctuation.\nEach line's ``unmatched_words`` lists key words the transcript lacks.\n``extra_words`` lists words heard after the whole text (a repeated end): with\n``trimmed_extra`` true the audio was already cut after the last expected word, else\nthe line is ``suspect`` and still ends on them (regenerate it).\n","inputSchema":{"properties":{"name":{"title":"Name","type":"string"},"offset":{"default":0.0,"title":"Offset","type":"number"},"project_dir":{"title":"Project Dir","type":"string"}},"required":["project_dir","name"],"title":"voice_viewArguments","type":"object"},"name":"voice_view"},{"description":"Read a queued, running, completed or failed render, batch, voice, index or refine job.\n\nWith ``wait_seconds`` greater than zero, wait in this call (up to 600\nseconds) instead of polling from the client; if the connection drops,\njust call again, a restarted server still finds the job. Pass\n``project_dir`` when it says \"job not found\". Completed index jobs\ncarry the compact index summary; completed speech_refine jobs carry\n``refine`` (refined clips, skipped clips with the reason, errors). Completed render jobs\ninclude the persisted RenderReport JSON; batch jobs (``render_batch``,\n``render_formats``) carry ``batch``: one entry per render (status, file, format,\nduration, score, seconds, error) as they finish, then ``total_seconds``,\n``cache_builds`` and the ``manifest`` path; completed voice jobs include\neach manifest line and its warnings. If a line is ``suspect``, an\nagent cannot listen to it: regenerate with slightly different wording,\nor accept it when the transcript differs only in punctuation.\n","inputSchema":{"properties":{"job_id":{"title":"Job Id","type":"string"},"project_dir":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null,"title":"Project Dir"},"wait_seconds":{"default":0,"title":"Wait Seconds","type":"number"}},"required":["job_id"],"title":"job_statusArguments","type":"object"},"name":"job_status"},{"description":"Run technical QC on a rendered project-relative video.\n\nPass a job id or saved report path when available. Inspect the returned\nsheet, the end card frame (``end.jpg``) and up to four overlay\ncrops before delivery. ``storyboard`` is the EFFECTIVE storyboard of that render (the\none of its format after the re-layout: ``renders/<batch>/_storyboards/<name>.json``,\nfound by itself next to a batch render): the overlay crops are then taken where its\noverlays really are (a caption moved by ``render_formats`` is not cut in half), and\n``caption_on_face`` checks the rendered frames for a caption on a face (needs the\nvision environment; every format, 9:16 too).\n","inputSchema":{"properties":{"project_dir":{"title":"Project Dir","type":"string"},"render_report":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null,"title":"Render Report"},"storyboard":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"string"},{"type":"null"}],"default":null,"title":"Storyboard"},"video":{"title":"Video","type":"string"}},"required":["project_dir","video"],"title":"qc_runArguments","type":"object"},"name":"qc_run"},{"description":"Score a rendered ad out of 100 for creative quality, with findings to fix.\n\n``qc_run`` says the file is technically correct; this says whether the ad\nis any good: a first second that holds attention (motion or a cut, a face\nor the product, a text within 0.5 s, audio at once), a pacing without a\ndip in the middle, captions that can be read (0.25 s per word + 0.6 s,\n7 words a line at most, contrast of 3:1 or more on the real frames), the\nproblem before the product, a call to action and an end card in the last\n4 s, overlays out of the platform interface (``platforms``: any of\n``tiktok``, ``reels``, ``stories``, ``feed``; the first three by default, ``feed``\nfor a 4:5 or 1:1 video) and a clear\nloudness, a voice 6 dB over the music and no silence over 0.7 s.\nPass the ``storyboard`` it was rendered from (object or saved path) for\nexact timings, words, roles and overlays; without it the checks that\nneed them are listed in ``skipped``. The result has ``score``,\n``sub_scores`` (hook, pacing, reading, story, safe_zones, audio),\n``findings`` sorted by ``impact`` (each with ``time``, ``severity``,\n``message`` and ``fix``), ``passed``, ``skipped``, the pixel boxes of the\n``safe_zones`` and the ``thresholds`` (guidelines, not rules). Images:\n``safe_zones_preview.jpg`` (the zones of each platform over a mid-ad\nframe, red where an overlay falls inside) and the frame of each top\nfinding: LOOK at them. Run it before delivery, fix the top findings,\nrender again, and aim for 80 or more. The texts of an ``info_card`` are read like written\ncaptions (0.25 s per word + 0.6 s) and count for the call to action, like the texts of an\nend card made with ``end_card``; with ``story: \"offer\"`` in the storyboard\n``product_too_early`` is not counted (and ``skipped`` says why).\n","inputSchema":{"properties":{"platforms":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"default":null,"title":"Platforms"},"project_dir":{"title":"Project Dir","type":"string"},"storyboard":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"string"},{"type":"null"}],"default":null,"title":"Storyboard"},"video":{"title":"Video","type":"string"}},"required":["project_dir","video"],"title":"ad_scoreArguments","type":"object"},"name":"ad_score"},{"description":"Measure how different a before and an after look, to rank candidate pairs.\n\n``before`` and ``after`` are project files: images, or clips (the frame\nat ``before_t`` / ``after_t`` seconds, the middle of the clip by default).\n``before_crop`` / ``after_crop`` (``{x, y, w, h}`` in source pixels) cut\none half out of a side-by-side composite, the same crop a ``reveal`` side\ntakes. The comparison is made on the face when a skin-region heuristic\nfinds one in both pictures (so a different distance still lines up), else\non the whole frame after aligning sizes. ``visible_difference`` is 0 to\n100 (under 12 not visible, under 30 subtle, under 55 visible, above that\nobvious at a glance); ``region`` says what was compared. The preview image\nshows the two pictures side by side: LOOK at it. Compare every available\npair (photos, composites split with ``crop``, frames of before/after\nclips) and use the one whose difference is obvious; a still pair of the\nsame pose beats moving clips for a reveal.\n","inputSchema":{"properties":{"after":{"title":"After","type":"string"},"after_crop":{"anyOf":[{"additionalProperties":{"type":"integer"},"type":"object"},{"type":"null"}],"default":null,"title":"After Crop"},"after_t":{"anyOf":[{"type":"number"},{"type":"null"}],"default":null,"title":"After T"},"before":{"title":"Before","type":"string"},"before_crop":{"anyOf":[{"additionalProperties":{"type":"integer"},"type":"object"},{"type":"null"}],"default":null,"title":"Before Crop"},"before_t":{"anyOf":[{"type":"number"},{"type":"null"}],"default":null,"title":"Before T"},"project_dir":{"title":"Project Dir","type":"string"}},"required":["project_dir","before","after"],"title":"compare_pairArguments","type":"object"},"name":"compare_pair"}],"ttlMs":0}}}
{"at":"2026-11-22T23:45:25.859Z","dir":"sent","era":"initialize","message":{"id":1,"jsonrpc":"2.0","method":"initialize","params":{"capabilities":{},"clientInfo":{"name":"didrun-lab","version":"0.1.0"},"protocolVersion":"2025-11-25"}}}
{"at":"2026-11-22T23:45:27.435Z","dir":"received","era":"initialize","message":{"id":1,"jsonrpc":"2.0","result":{"capabilities":{"prompts":{"listChanged":false},"resources":{"listChanged":false,"subscribe":false},"tools":{"listChanged":false}},"instructions":"Workflow for an AdAnvil editing agent:\n1. Onboard the brand and keep the open questions visible.\n2. Index the footage, then LOOK at the contact sheets before choosing clips.\n3. Annotate the useful entries and search the catalogue instead of rescanning folders.\n4. Decode the reference ad, then LOOK at its contact sheet and key moments.\n5. Pick a recipe and read its checklist before writing the storyboard.\n6. Write a storyboard using project-relative paths and the recipe structure.\n7. Preview captions on real frames and check the returned bbox and overflow.\n8. Validate the storyboard and fix errors before rendering.\n9. If the ad needs narration, queue voice_generate, read its manifest, and\n   align one or more shots to each line before adding voice_captions.\n   If the ad is a creator talking to camera, index the footage with speech\n   (library_index transcribes clips with sound), choose the takes with\n   speech_takes, cut with the clean_segments of speech_view, keep the creator's\n   own sound with audio.clips, cover cuts with audio_from, and caption with\n   speech_captions. Indexing transcribes fast (a small model) to make the\n   speech searchable: run speech_refine on the clips you choose before\n   captioning, and fix a last misheard word with speech_captions.corrections.\n10. Render a preview or final job, then run QC and LOOK at the returned images.\n11. Iterate on the storyboard when the images or report reveal a problem.\n12. Before delivery, run ad_score on the render (with its storyboard), LOOK at the safe zones\n    preview and the frame of each top finding, fix the findings by impact, render again and\n    aim for 80 or more. storyboard_validate(score_check=true) shows the cheap part earlier.\nBefore and after: rank every candidate pair (photos, a composite split with crop, frames of\nbefore/after clips) with compare_pair, LOOK at the previews and use the pair whose difference\nis obvious at a glance; a still pair of the same pose beats moving clips for a reveal.\nMusic: music_search finds tracks whose licence allows an ad (CC0, PDM, CC BY, CC BY-SA),\nmusic_fetch downloads one into music/ with its licence; the render warns music_licence_unknown\nor music_attribution_required (put the given text in the ad's description).\nSound design (optional): sfx_list(fetch=true) builds the CC0 sound pack in sfx/;\nadd {type: sfx, source, at, volume} overlays or audio.sfx_auto (cuts, captions);\nfor a music-led ad, music_beats shows the beats and storyboard_snap moves the\ncuts onto them (validation reports beat_alignment).\nVisual devices (optional, one or two per ad): a reveal segment (a divider sweeps a before\npicture away to show the after picture) or a split segment (two panels, labels) for honest\nbefore/after, a video overlay (picture-in-picture), sticker overlays (arrow, circle, underline,\nbadge, emoji, image), an image overlay as a card (animation, frame, rotate: a before/after photo\nor a review screenshot coming in over the video), an info_card overlay (AdAnvil draws an\ninformation card: one idea, a few words, one card at a time, coming in while the voice says it;\npause the captions meanwhile), a progress overlay and punch on a clip segment (instant zoom).\nFor an announcement, a lead collection or an offer ad that shows the product from the first\nsecond, set story to \"offer\" (product_too_early is then not checked).\nVoice lines marked suspect cannot be listened to by an agent: regenerate with\nslightly different wording, or accept the line when the transcript differs\nonly by punctuation. A line also turns suspect when 2 or more of its\n`unmatched_words` (words of 4+ letters not heard in the transcript) are\nmissing: reword those words and check the transcript.\nThe rules in docs/EDITING_GUIDE.md apply; retrieve them with editing_guide.\n","protocolVersion":"2025-11-25","serverInfo":{"name":"adanvil","version":"0.4.0"}}}}
{"at":"2026-11-22T23:45:27.435Z","dir":"sent","era":"initialize","message":{"jsonrpc":"2.0","method":"notifications/initialized"}}
{"at":"2026-11-22T23:45:27.435Z","dir":"sent","era":"initialize","message":{"id":2,"jsonrpc":"2.0","method":"tools/list","params":{}}}
{"at":"2026-11-22T23:45:27.437Z","dir":"received","era":"initialize","message":{"id":2,"jsonrpc":"2.0","result":{"tools":[{"description":"Create an AdAnvil project skeleton.\n\nUse this first for a new absolute project directory, then inspect the\nreturned folders before adding media.\n","inputSchema":{"properties":{"name":{"title":"Name","type":"string"},"project_dir":{"title":"Project Dir","type":"string"}},"required":["project_dir","name"],"title":"project_initArguments","type":"object"},"name":"project_init"},{"description":"Read a UTF-8 project text file using the project's safe path rules.\n\nOnly AdAnvil's own files can be read: ``adanvil.json``, ``brand.yaml``, ``catalog.json``\nand ``brand_brief.md`` at the top of the project, and the files under ``brand/``,\n``reference/``, ``renders/``, ``music/``, ``storyboards/``, ``exports/``, ``cache/``,\n``voice/``, ``sfx/`` and ``footage/`` (extensions .txt, .md, .json, .yaml, .yml, .csv).\nAny other file, and any name that starts with a dot, is refused. ``max_bytes`` (default\n65536) is capped at 1 MB; a larger value is clamped and the result ``note`` says so.\n","inputSchema":{"properties":{"max_bytes":{"default":65536,"title":"Max Bytes","type":"integer"},"path":{"title":"Path","type":"string"},"project_dir":{"title":"Project Dir","type":"string"}},"required":["project_dir","path"],"title":"project_read_textArguments","type":"object"},"name":"project_read_text"},{"description":"Run brand onboarding step one or two.\n\nUse without answers to discover site facts and questions, then call\nwith answers to write brand.yaml and brand_brief.md. Use open_questions\nto decide what the human must answer (a person whose consent is not yet\na yes or a no is listed as ``people.<id>.consent``). ``facts`` is a compact summary of\nthe site (title, colours, fonts, headings, prices, guarantee phrases,\na few products); the complete facts are saved in ``facts_file``\n(brand/site_facts.json): read it with project_read_text only when you\nneed more. ``more`` counts what the summary left out.\n","inputSchema":{"properties":{"answers":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"default":null,"title":"Answers"},"project_dir":{"title":"Project Dir","type":"string"},"url":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null,"title":"Url"}},"required":["project_dir"],"title":"brand_onboardArguments","type":"object"},"name":"brand_onboard"},{"description":"Read the current brand profile and brief.\n\nUse this before writing captions or storyboards so copy follows the\nbrand defaults and constraints. ``brand.product_versions`` says how to\ntell the product versions apart (match it with the ``product_version``\nannotation of library entries). ``brand.cta_image`` is the brand's\nready-made call-to-action image, to use as the last segment.\n``emoji_available`` lists the emoji characters of the brand's emoji\nfolder, or is \"all\" for twemoji (and empty for none).\n","inputSchema":{"properties":{"project_dir":{"title":"Project Dir","type":"string"}},"required":["project_dir"],"title":"brand_getArguments","type":"object"},"name":"brand_get"},{"description":"Index or refresh media under a project-relative folder or file.\n\nUse it before selection. ``source`` is a folder or a single media file.\nUp to 8 new or changed files are indexed in this call; more than 8 run\nas a detached job and the call returns at once with ``job_id`` (wait\nwith job_status(job_id, wait_seconds=90), progress is per file). The\nresult is compact: counts, one line per new or updated entry (id, path,\nduration, people, product_visible, ``speech`` when the clip speaks) and\nerrors. Contact sheets are not sent inline: use library_view, or\nlibrary_search with full=true for entries in full.\n\n``transcribe`` controls the speech of the clips: \"auto\" (default)\ntranscribes, with word timestamps, the clips that have an audio stream\nthat is not near-silent; true transcribes every clip with an audio\nstream; false does no speech work. It uses faster-whisper when\ninstalled, else the voice environment (adanvil voice-setup); with\nneither, entries get a clear ``speech`` status (\"unavailable: ...\") and\nindexing still succeeds. The model is ADANVIL_SPEECH_MODEL (default\nbase: fast, good enough to search) and the language is the brand\nlanguage, else auto-detected; the brand name, the product name and\n``speech.vocabulary`` of brand.yaml are given to the transcriber. The\nspeech of each file is saved as soon as that file is transcribed, so\nlibrary_search(text=...) works while the job runs (stage\n\"transcribing\"). Words are right about nine times in ten: run\nspeech_refine on the clips you will use before captioning. Audio files\n(.m4a, .wav, .mp3, .aac) are indexed as ``audio`` entries, with their\nspeech, and can be used as ``audio_from`` sources. A video whose sound\nis silent gets the speech status ``silent_audio`` and, when audio files\nwith a similar name are nearby, ``separate_audio_candidates``. The\nresult has a ``speech`` count by status.\n\n``vision`` controls the vision pass: with the vision environment\ninstalled (``adanvil vision-setup`` or the tool ``vision_setup``) each\nimage and video is also looked at (\"auto\", default): the frames of its\ncontact sheet are embedded (so ``library_search(query=...)`` can find\nshots by sentence) and searched for faces, the entry gets ``auto_tags``\n(zero-shot labels such as person, bathroom, smiling, never mixed with\nyour ``tags``) and, when ``brand.product_versions`` has reference\nphotos, a guess of the product version per shot. ``true`` redoes every\nentry; ``false`` skips the pass. Without the environment the result\nsays ``vision: {\"unavailable\": n}`` and indexing still succeeds.\n\nCuts: the scene change is scored on every frame (threshold 0.15), so\na jump cut between two takes of one person in the same room is a shot\nboundary (``library_view`` shows the shots; each entry keeps the\ndetector it was measured with as ``shots_detector``, for example\n``full@0.15``). A source above 1920 px is read at its keyframes only\n(``keyframes@0.3``): its cuts are only seen at keyframes, so look at\nits sheet. Catalogs made before 0.4.0 keep their old, coarser shots:\npass ``refresh_shots=true`` to measure the shots of the already\nindexed videos in ``source`` again (annotations, speech, vision and\nproduct versions stay as they are; the contact sheet is redrawn when\nthe shots changed, and the per-shot product guesses of such an entry\nare cleared, run vision=true to compute them again). The result\ncounts ``refreshed`` entries and ``shots_changed`` (the ones whose\nnumber of shots changed) and lists them under ``shots_refreshed``.\nDo it once per old catalog, before choosing segments: a segment\nplaced across a hidden cut shows a flash of another take\n(``storyboard_validate`` warns ``segment_crosses_cut``).\n","inputSchema":{"properties":{"project_dir":{"title":"Project Dir","type":"string"},"refresh_shots":{"default":false,"title":"Refresh Shots","type":"boolean"},"source":{"default":"footage","title":"Source","type":"string"},"transcribe":{"anyOf":[{"type":"boolean"},{"const":"auto","type":"string"}],"default":"auto","title":"Transcribe"},"vision":{"anyOf":[{"type":"boolean"},{"const":"auto","type":"string"}],"default":"auto","title":"Vision"}},"required":["project_dir"],"title":"library_indexArguments","type":"object"},"name":"library_index"},{"description":"Return one catalogue entry and its contact sheet.\n\nUse it when a summary identifies a candidate; LOOK at the image before\nchoosing a shot. An audio entry has no sheet: only its data is returned.\n","inputSchema":{"properties":{"entry_id":{"title":"Entry Id","type":"string"},"project_dir":{"title":"Project Dir","type":"string"}},"required":["project_dir","entry_id"],"title":"library_viewArguments","type":"object"},"name":"library_view"},{"description":"Merge annotations into one catalogue entry.\n\nParameters: ``project_dir`` (str, absolute project path), ``entry_id``\n(str, catalog entry id), ``description`` (str or null), ``tags``\n(list[str] or null), ``people`` (list[str] or null), ``product_visible``\n(bool or null), ``product_version`` (short free string such as\n``current``, ``old`` or ``v2``, or null), ``emotion`` (list of what the\nfaces express, a clip can show several: none, neutral, worried,\nfrustrated, sad, tired, closed, skeptical, shocked, curious, relaxed,\nhappy, satisfied; the same words as the breakdown, the segments and the\nsearch filter, anything else is refused; or null), ``quality`` (int 1-5 or null),\n``usable`` (list of ``[start, end, note]``, ``[start, end]``, or objects with ``start``,\n``end`` and ``note``; or null), ``notes`` (str or null), ``exclude``\n(bool or null), and ``exclude_reason`` (str or null).\n\nExample: ``library_annotate('/abs/project', 'clip-a1b2c3',\ntags=['hero'], quality=5, usable=[[1.2, 3.4, 'clear demo']])``.\nUse after looking at the contact sheet; search can then filter by tags,\npeople, product version, emotion, quality and exclusion.\n","inputSchema":{"properties":{"description":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null,"title":"Description"},"emotion":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"default":null,"title":"Emotion"},"entry_id":{"title":"Entry Id","type":"string"},"exclude":{"anyOf":[{"type":"boolean"},{"type":"null"}],"default":null,"title":"Exclude"},"exclude_reason":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null,"title":"Exclude Reason"},"notes":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null,"title":"Notes"},"people":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"default":null,"title":"People"},"product_version":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null,"title":"Product Version"},"product_visible":{"anyOf":[{"type":"boolean"},{"type":"null"}],"default":null,"title":"Product Visible"},"project_dir":{"title":"Project Dir","type":"string"},"quality":{"anyOf":[{"type":"integer"},{"type":"null"}],"default":null,"title":"Quality"},"tags":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"default":null,"title":"Tags"},"usable":{"anyOf":[{},{"type":"null"}],"default":null,"title":"Usable"}},"required":["project_dir","entry_id"],"title":"library_annotateArguments","type":"object"},"name":"library_annotate"},{"description":"Search indexed footage using annotations and technical metadata.\n\nUse the returned entries to choose clips without rescanning the\nfilesystem. Each result is one compact line (id, path, duration,\npeople, product_visible, version, emotion, quality); ``full=true`` returns\nthe entries in full. ``product_version`` and ``emotion`` (a list: every\nlisted emotion must be on the clip) filter on what was set with\nlibrary_annotate; without a human ``product_version`` annotation the\nguess made from the brand's reference photos is used (a human annotation\nalways wins). ``auto_tags`` filters on the automatic tags of the vision\npass (English labels such as ``bathroom`` or ``smiling``; common French,\nSpanish and German words are understood).\n\n``query`` searches by SENTENCE across the whole library, with no sheet\nto open: ``query=\"a woman with a sad face touching her jaw\"`` (any\nlanguage) ranks SHOTS by text-image similarity and returns the best\n``limit`` (default 12, at most 48) as ``results`` (entry, shot, start,\nend, time of the best frame, score) plus ONE mosaic image of those frames,\nnumbered like the list. All the other filters apply first. It needs the\nvision environment (``vision_setup``) and entries indexed with it\n(``library_index``); ``missing_vision`` counts the entries that have no\nvision data yet. Look at the mosaic, then library_view the entry to confirm\nbefore choosing. The score is a centred match probability: 0.5 and more is a\nclear match, under 0.1 means nothing in the library looks like it.\n","inputSchema":{"properties":{"auto_tags":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"default":null,"title":"Auto Tags"},"emotion":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"default":null,"title":"Emotion"},"full":{"default":false,"title":"Full","type":"boolean"},"include_excluded":{"default":false,"title":"Include Excluded","type":"boolean"},"kind":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null,"title":"Kind"},"limit":{"default":12,"title":"Limit","type":"integer"},"min_duration":{"anyOf":[{"type":"number"},{"type":"null"}],"default":null,"title":"Min Duration"},"min_quality":{"anyOf":[{"type":"integer"},{"type":"null"}],"default":null,"title":"Min Quality"},"people":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"default":null,"title":"People"},"product_version":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null,"title":"Product Version"},"product_visible":{"anyOf":[{"type":"boolean"},{"type":"null"}],"default":null,"title":"Product Visible"},"project_dir":{"title":"Project Dir","type":"string"},"query":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null,"title":"Query"},"tags":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"default":null,"title":"Tags"},"text":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null,"title":"Text"}},"required":["project_dir"],"title":"library_searchArguments","type":"object"},"name":"library_search"},{"description":"Install the optional vision environment (once, several minutes, about 2.5 GB).\n\nIt makes its own Python environment in the AdAnvil cache folder with a\nsmall multilingual image and text embedding model (SigLIP 2, Apache-2.0)\nand a face detector (YuNet, MIT), both free for commercial use, and\ndownloads their weights. It runs on the CPU. Afterwards ``library_index``\nalso looks at every image and video (shot search by sentence, automatic\ntags, product versions, faces for ``focus: \"face\"``). Without it\neverything else works as before. The environment is made from the\ndefault Python of this machine: to build it from another interpreter,\na person runs ``adanvil vision-setup --python <path>`` in a terminal.\n","inputSchema":{"properties":{},"title":"vision_setupArguments","type":"object"},"name":"vision_setup"},{"description":"Read the speech of one indexed clip and get safe cuts for it.\n\nPass ``entry_id`` (from library_index or library_search) or ``source`` (the\nproject-relative path of a video or audio file). Needs the clip to be indexed with\nspeech (library_index transcribes clips with sound). The output is compact:\n``phrases`` (split on pauses longer than ``max_pause`` seconds and on sentence\npunctuation), each with ``start``, ``end``, ``text`` and ``flags`` (``restart``: the\nnext phrase repeats it, a retake; ``filler``: it holds a hesitation; ``uncertain``:\nthe transcriber doubted a word, so it may be misheard); ``fillers`` (euh, heu, hum,\nbah, ben, um, uh, er, and genre, du coup, like when said alone between pauses; the\nlists can be replaced in brand.yaml under ``speech.fillers`` and\n``speech.isolated_fillers``); ``restarts`` (a phrase that repeats the start of the\nnext one: a retake inside the file); and ``clean_segments``: clip segments\n``{source, in, out}`` ready to paste into a storyboard, which keep the speech and drop\npauses over ``max_pause`` and the fillers (0.06 s kept before a word, 0.10 s after,\nnever cutting inside a word). Per-word data (start, end, text and ``filler`` for each\nword) only comes with ``words=true``. At most ``max_phrases`` phrases are returned\n(default 60) from ``first_phrase``: when there are more, ``note`` and\n``next_first_phrase`` tell how to get the next ones, and the other lists are those of\nthe phrases shown. With ``drop_restarts`` true the restart phrases are cut out of the\nclean segments too (they are only flagged by default, because a deliberate repetition\nlooks the same). ``model`` says which transcription model made the words: if a clip\nis used in the ad, run speech_refine on it first. A clip whose sound is silent says\n``speech_status: silent_audio`` and lists ``separate_audio_candidates``.\n","inputSchema":{"properties":{"drop_restarts":{"default":false,"title":"Drop Restarts","type":"boolean"},"entry_id":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null,"title":"Entry Id"},"first_phrase":{"default":0,"title":"First Phrase","type":"integer"},"max_pause":{"default":0.35,"title":"Max Pause","type":"number"},"max_phrases":{"default":60,"title":"Max Phrases","type":"integer"},"project_dir":{"title":"Project Dir","type":"string"},"source":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null,"title":"Source"},"words":{"default":false,"title":"Words","type":"boolean"}},"required":["project_dir"],"title":"speech_viewArguments","type":"object"},"name":"speech_view"},{"description":"Transcribe chosen clips again with a stronger model and replace their words.\n\nIndexing transcribes fast with a small model, so about one key word per line can be\nmisheard (names, numbers, rare words). Call this on the clips you will use in the ad\n(before cutting and captioning): ``sources`` lists project paths of indexed clips (a\nfile, or a folder for every clip below it) or catalogue entry ids. It starts a\ndetached job (wait with job_status(job_id, wait_seconds=90); progress counts clips)\nthat transcribes them with ``model`` (one of tiny, base, small, medium, large-v2,\nlarge-v3, large-v3-turbo; default medium: slower, much more accurate; a medium model\nneeds about 2 GB of memory) and the brand vocabulary (brand name,\nproduct name and ``speech.vocabulary`` of brand.yaml), then replaces the words of\neach clip in place (``speech_view`` reports the ``model``). A clip that fails keeps\nits previous words. The language is the brand's, else detected, unless ``language``\nis given. The result of the finished job is ``refine`` in job_status (refined ids,\nskipped clips with the reason, errors). A word that is still wrong afterwards can be\nshown correctly with ``speech_captions.corrections`` (close spellings only).\n","inputSchema":{"properties":{"language":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null,"title":"Language"},"model":{"default":"medium","enum":["tiny","base","small","medium","large-v2","large-v3","large-v3-turbo"],"title":"Model","type":"string"},"project_dir":{"title":"Project Dir","type":"string"},"sources":{"items":{"type":"string"},"title":"Sources","type":"array"}},"required":["project_dir","sources"],"title":"speech_refineArguments","type":"object"},"name":"speech_refine"},{"description":"Pick the best take of each line across several recordings of a script.\n\nPass ``source`` (a project folder such as footage/hooks, or one file) and/or\n``entry_ids``: the clips to compare, for example HOOK1.mov, HOOK1.1.mov and\nHOOK1.2.mov. Phrases that say the same line (normalised text similarity of at\nleast 0.6, inside one file or across files) form a line; each take is ranked on\nfluency (no filler, no restart), a complete ending (last word not cut), a speech\nrate in the natural band (about 1.9 to 4.2 words per second) and the audio level.\nReturns ``lines``: for each, the ``best`` take (entry_id, source, start, end,\ntext, score, ``why`` and ready-to-paste ``clean_segments``) and the ``others``\nwith the ``issues`` that put them behind. ``skipped`` lists clips without a\ntranscript (run library_index with transcribe=true on them).\n","inputSchema":{"properties":{"entry_ids":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"default":null,"title":"Entry Ids"},"max_pause":{"default":0.35,"title":"Max Pause","type":"number"},"project_dir":{"title":"Project Dir","type":"string"},"source":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null,"title":"Source"}},"required":["project_dir"],"title":"speech_takesArguments","type":"object"},"name":"speech_takes"},{"description":"Decode a reference video into shots, pacing, text, speech and sheets.\n\n``transcribe`` is true, false or \"auto\" (default: transcribe when the\nreference has audible sound and a transcriber is available). Returns\nthe JSON, the overview sheet, then up to 6 shot sheets (one row per\nshot, three frames each). LOOK at every shot sheet and read the\non-screen text, then call reference_breakdown with the filled\nbreakdown_template before choosing footage. The JSON is compact: the\nper-word transcript and rms_per_second stay in reference.json (see\n``files``); each shot has its ``spoken`` text and ``transcript_text``\nholds the whole transcript. ``breakdown_vocabularies`` lists the\nallowed type, scale, role, motion, emotion, text_speaker and text_device\nvalues and how to read who speaks in the on-screen text; ``music_profile`` is\nthe tempo and energy of the reference soundtrack (voice included).\n","inputSchema":{"properties":{"language":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null,"title":"Language"},"project_dir":{"title":"Project Dir","type":"string"},"transcribe":{"anyOf":[{"type":"boolean"},{"const":"auto","type":"string"}],"default":"auto","title":"Transcribe"},"video":{"title":"Video","type":"string"}},"required":["project_dir","video"],"title":"reference_decodeArguments","type":"object"},"name":"reference_decode"},{"description":"Save the agent's shot-by-shot breakdown of a decoded reference.\n\n``reference`` is the decode folder (reference/<slug>) or its\nreference.json. ``shots`` follows breakdown_template: one entry per\nshot, or one entry for consecutive shots (``\"shots\": [4, 5]``); every\ndecoded shot must be covered exactly once. Controlled values: type,\nscale, role, motion, emotion, text_speaker,\ntext_device (errors list the allowed ones); ``action`` is free short\ntext: what the person does (for example \"wipes the counter and sighs\"). For every\nshot note what the person feels (``emotion``) and does, then pick a\nlibrary shot with the same emotion and the same kind of action.\ntext_speaker and text_device say who speaks in the on-screen text (an\nemoji or name, \":\" and quotes is a character talking); subject is a\nshort id (person_a, product, diagram), on_screen_text is read verbatim,\nreplacement is a library entry id or \"missing: ...\". Returns type\ndemand, scale mix, role sequence, repeated patterns, people, text\nshots, text_devices, dialogue, emotion_by_role (the emotions used for each\nrole), pacing and missing shots. Use it before library_overview.\n","inputSchema":{"properties":{"project_dir":{"title":"Project Dir","type":"string"},"reference":{"title":"Reference","type":"string"},"shots":{"items":{"additionalProperties":true,"type":"object"},"title":"Shots","type":"array"}},"required":["project_dir","reference","shots"],"title":"reference_breakdownArguments","type":"object"},"name":"reference_breakdown"},{"description":"Overview of the footage folders without indexing, plus a mosaic.\n\nLists folders up to ``depth`` with file, video and image counts, total\nvideo seconds and first file names. With ``mosaic``, returns a labelled\nthumbnail mosaic of the media under ``path`` (48 per page, 6 columns);\n``pages`` tells how many, call again with ``page`` to see the next\nones. Run it on the whole footage\ntree (B-roll folders included) to find each shot type the reference\nbreakdown needs, before choosing shots.\n","inputSchema":{"properties":{"depth":{"default":2,"title":"Depth","type":"integer"},"mosaic":{"default":true,"title":"Mosaic","type":"boolean"},"page":{"default":1,"title":"Page","type":"integer"},"path":{"default":"footage","title":"Path","type":"string"},"project_dir":{"title":"Project Dir","type":"string"}},"required":["project_dir"],"title":"library_overviewArguments","type":"object"},"name":"library_overview"},{"description":"Extract one full-resolution frame from a project video or image.\n\nGive the time ``t`` (seconds) or the frame number ``frame`` (video only, counted from\n0). Returns the frame ON SCREEN at ``t`` (``floor(t * fps)``): at 2.87 s of a 30 fps\nvideo that is the frame starting at 2.867 s, not the next one at 2.900 s. A ``t``\nwithin 1 ms of a frame boundary is that frame (10.9333 s at 30 fps is frame 328), so a\ntime printed to four decimals lands on the right frame. ``frame_t`` is the frame's exact\nstart time and ``frame`` its number (video only). Use it to inspect the exact moment\nbehind a timecode; the saved frame is under cache/frames/.\n","inputSchema":{"properties":{"frame":{"anyOf":[{"type":"integer"},{"type":"null"}],"default":null,"title":"Frame"},"project_dir":{"title":"Project Dir","type":"string"},"source":{"title":"Source","type":"string"},"t":{"anyOf":[{"type":"number"},{"type":"null"}],"default":null,"title":"T"}},"required":["project_dir","source"],"title":"frame_viewArguments","type":"object"},"name":"frame_view"},{"description":"Export a storyboard as an editable timeline for DaVinci Resolve or Premiere Pro.\n\nWrites ``exports/<name>/`` with ``<name>.otio`` (OpenTimelineIO: video tracks, speed as\na time warp, stills, captions as markers on V1, overlay pictures, voice, music and one\naudio track per sound effect), ``<name>.xml`` (Final Cut Pro 7 XML, read by Premiere\nPro and Resolve, with the real rate, size and duration of each source, speed as Time\nRemap, music and sound effect levels and fades), ``<name>.edl`` (CMX 3600, video cuts\nonly, the fallback), ``<name>.srt`` (every caption at its final time), ``overlays/``\n(each caption, sticker and card as a full-canvas transparent PNG named after its\nstoryboard overlay index, with its place in ``overlays.json``) and ``README.txt``.\n``formats`` is any of ``otio``, ``fcp7xml``, ``edl``, ``srt`` (all by default). Media\npaths are absolute, as the project sees them; ``relative`` writes\n``exports/<name>-relative/`` with paths relative to the folder (and a ``relink.txt``),\n``copy_media`` writes ``exports/<name>-portable/`` with the used sources copied into\n``media/``; ``media_root`` is the absolute folder a relative export will live in. A\nfolder that holds an export of another media mode is only replaced with\n``overwrite=true``. The result lists ``warnings`` (what is approximated) and\n``not_exported`` (what no editor format here carries: grading, reframing, pop\nanimations, split layout, loudness, the EDL audio).\n","inputSchema":{"properties":{"copy_media":{"default":false,"title":"Copy Media","type":"boolean"},"formats":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"default":null,"title":"Formats"},"media_root":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null,"title":"Media Root"},"overwrite":{"default":false,"title":"Overwrite","type":"boolean"},"project_dir":{"title":"Project Dir","type":"string"},"relative":{"default":false,"title":"Relative","type":"boolean"},"storyboard":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"string"}],"title":"Storyboard"}},"required":["project_dir","storyboard"],"title":"timeline_exportArguments","type":"object"},"name":"timeline_export"},{"description":"List available ad recipes with purpose and duration.\n\nUse this to shortlist a shape, then read its checklist with recipe_get\nbefore writing a storyboard.\n","inputSchema":{"properties":{},"title":"recipe_listArguments","type":"object"},"name":"recipe_list"},{"description":"Return one complete recipe, including rules and example.\n\nUse its checklist as the storyboard acceptance criteria.\n","inputSchema":{"properties":{"recipe_id":{"title":"Recipe Id","type":"string"}},"required":["recipe_id"],"title":"recipe_getArguments","type":"object"},"name":"recipe_get"},{"description":"Return the editing doctrine for footage, copy, rendering and QC.\n\nRead it before the first storyboard and whenever a rule is unclear.\n","inputSchema":{"properties":{},"title":"editing_guideArguments","type":"object"},"name":"editing_guide"},{"description":"Return the JSON Schema for Storyboard v1.\n\nUse it to construct agent-authored storyboards before validation.\n","inputSchema":{"properties":{},"title":"storyboard_schemaArguments","type":"object"},"name":"storyboard_schema"},{"description":"Save a storyboard in the project as ``storyboards/<name>.json`` and return its path.\n\nSend the storyboard object once, then pass the returned path\n(``\"storyboards/<name>.json\"``) as ``storyboard`` to ``storyboard_validate``,\n``render_start`` and ``caption_preview`` instead of repeating the whole object\n(useful on a remote server). Saving again under the same name replaces the file.\nThe object is stored as sent, not validated: ``storyboard_validate`` checks it.\n","inputSchema":{"properties":{"name":{"title":"Name","type":"string"},"project_dir":{"title":"Project Dir","type":"string"},"storyboard":{"additionalProperties":true,"title":"Storyboard","type":"object"}},"required":["project_dir","storyboard","name"],"title":"storyboard_saveArguments","type":"object"},"name":"storyboard_save"},{"description":"Edit a saved storyboard in place: ``changes`` is a list of ``{path, value}``.\n\nA path walks the JSON with dots and indexes: ``segments.3.out`` (``segments[3].out``\nworks too). Setting a missing key of an object adds it; the index just past the end of\na list, or ``-``, appends; ``{\"path\": \"overlays.1\", \"remove\": true}`` deletes. The\nchanges apply in order to a copy: if one is wrong, nothing is saved and the error\nnames it. When the changes rename the storyboard (``name``), its ``output.path`` follows\nif it was the default of the old name (a path set by hand stays). The file\n``storyboards/<name>.json`` is rewritten and the result lists the\nschema problems left (``problems``, empty when the storyboard is valid; run\n``storyboard_validate`` for the full check).\n","inputSchema":{"properties":{"changes":{"items":{"additionalProperties":true,"type":"object"},"title":"Changes","type":"array"},"name":{"title":"Name","type":"string"},"project_dir":{"title":"Project Dir","type":"string"}},"required":["project_dir","name","changes"],"title":"storyboard_patchArguments","type":"object"},"name":"storyboard_patch"},{"description":"Render a caption, a comment or an information card over a real 9:16 frame.\n\nAn ``info_card`` overlay (see the storyboard schema) is drawn, settled, as the render\ndraws it: the result has its image on the real frame, its ``bbox`` (inside the frame\nwhen it fits), ``size_used`` (the title size), ``overflow`` and ``lines``. A banned word\nof the brand in its texts is an error.\n\nUse it before rendering to inspect placement; the JSON reports bbox,\nfitted size, overflow and final lines. ``emoji`` takes the storyboard\n``emoji`` values (twemoji, none or a project folder) so the preview\nmatches the render; ``emoji_missing`` lists emoji absent from a folder.\nFor a ``voice_captions`` overlay pass ``manifest``: the ``audio.voice``\npath of your storyboard (voice/<name>/manifest.json); ``expanded``\nlists the resulting captions once. A ``speech_captions`` overlay is\nbuilt from the speech of the clips: pass ``chunk_index`` to pick the\ncaption to draw and ``storyboard`` (a project path such as\n``storyboards/<name>.json`` or the object) so the timeline is the one of\nyour ad; without it the captions are those of ``source`` played whole.\n``expanded`` lists them all. With ``start``/``end`` on a ``voice_captions`` or\n``speech_captions`` overlay only the captions inside that window exist (``chunk_index``\ncounts those); a voice preview takes its offset from the overlay (``offset``), not from\nthe storyboard. An animated caption (``animation``\n``karaoke``, ``word`` or ``pop``) is drawn in one of its states, to check\nwhere the highlight lands: put ``chunk_index`` and ``word_index`` in the\noverlay object to pick the chunk and the lit word, or leave them out to\nget the state on screen at timeline time ``t``. The result names the\n``word_index``, the ``window`` of the state and how many ``states`` the\nchunk has.\n","inputSchema":{"properties":{"emoji":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null,"title":"Emoji"},"overlay":{"additionalProperties":true,"title":"Overlay","type":"object"},"project_dir":{"title":"Project Dir","type":"string"},"source":{"title":"Source","type":"string"},"storyboard":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"string"},{"type":"null"}],"default":null,"title":"Storyboard"},"t":{"title":"T","type":"number"}},"required":["project_dir","source","t","overlay"],"title":"caption_previewArguments","type":"object"},"name":"caption_preview"},{"description":"Compose a clean end card image from a real product photo.\n\nUse it only when the brand has no ready-made call-to-action image: when\nit has one (``brand.cta_image``, a ``cta/`` folder or ``brand/``),\nuse that image as the last segment (``image``, ``zoom_in``, about 3 s)\ninstead. It writes\n``brand/endcards/<name>.png`` (1080x1920 unless ``spec.format`` says\notherwise) and returns the path, the layout boxes and the image: LOOK at\nit. ``spec``: ``product_image`` (project path of a photo or a video, with\n``t`` for the frame, optional ``crop`` {x,y,w,h} in the source's display\npixels, before scaling: on a 1920x1080 frame ``{\"x\": 600, \"y\": 100,\n\"w\": 700, \"h\": 700}`` keeps a 700 px square; the result returns\n``source_size`` [w, h] to measure it), ``pill``, ``title``\n(a string or runs ``{text, accent}``), ``subline``, ``badges`` (up to 3,\n``{text, icon: check|star|none}``), ``button`` (``{text, arrow:\ndown|right|none}``), colours ``accent``, ``text``, ``muted``,\n``background`` (two colours), ``family``, ``emoji``. Colours default to\nthe brand's. Banned words of the brand on any text are an error. Use the\nPNG as the last segment: ``type: image``, ``motion: zoom_in``, about 3 s,\nlabel ``end_card``, no subtitles on it. It also writes\n``brand/endcards/<name>.png.json``, the texts drawn (pill, title,\nsubline, badges, button): ``storyboard_validate`` reads it, so\n``cta_text_missing`` is not raised when the button already says the\nbrand's call to action.\n","inputSchema":{"properties":{"name":{"title":"Name","type":"string"},"project_dir":{"title":"Project Dir","type":"string"},"spec":{"additionalProperties":true,"title":"Spec","type":"object"}},"required":["project_dir","spec","name"],"title":"end_cardArguments","type":"object"},"name":"end_card"},{"description":"Validate a storyboard object or project-relative JSON file.\n\n``storyboard`` is the object, or the path saved by ``storyboard_save``\n(``\"storyboards/<name>.json\"``). Every schema error is reported at once.\n\nThe check covers Storyboard v1, its files, brand and recipe. Fix every\nerror path before render_start; warnings are questions to review. With\n``reference`` set, ``ref_*`` warnings and a ``reference_comparison``\nblock compare the edit with the reference breakdown. With\n``score_check=true`` it also runs the quick pre-check of ``ad_score``\nthat needs no pixels, as warnings prefixed ``score_`` (reading time and\nline length, product too early, call to action, platform safe zones of\nthe overlays); ``summary.score_precheck`` lists what passed and what\ncould not be checked.\n\nWarning ``segment_crosses_cut``: a clip segment (or the clip side of a\n``split`` panel or a ``reveal``) whose source is indexed has a change of\ntake (a shot boundary of ``library_view``) strictly inside its range, more\nthan 0.12 s from each end as the viewer sees it (``speed`` counts). The\nviewer would see a flash of another take, or a jump in the middle of the\nshot: move ``in`` after the cut or ``out`` before it, as the message\nsays. ``summary.cut_check`` counts the segments checked and the ones that\ncross a cut, and lists under ``old_shots`` the sources measured before\n0.4.0, whose shots can hide cuts. Sources that are not indexed, or have\none shot, say nothing; run ``library_index`` (``refresh_shots=true`` for\ncatalogs made before 0.4.0) so that the cuts of long clips are known.\n``cta_text_missing`` also reads the texts of an end card made with\n``end_card`` when it is the last segment, and those of ``info_card`` overlays.\n\nInformation cards (``info_card`` overlays): each is drawn and checked. Error\n``info_card_out_of_frame`` (the card leaves the frame), ``banned_word`` in its texts;\nwarnings ``info_card_overlap`` (two cards on screen together: show one at a time),\n``caption_over_info_card`` (a caption overlaps a card while both are on screen: pause\nthe captions with ``start``/``end``), ``text_overflow`` (the title does not fit at its\nsmallest size) and ``emphasis_unmatched``. With ``story: \"offer\"`` (announcements, lead\ncollection, offers where the product is in hand from the first second)\n``product_too_early`` is not raised, and ``summary.skipped`` says so.\n","inputSchema":{"properties":{"project_dir":{"title":"Project Dir","type":"string"},"recipe_id":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null,"title":"Recipe Id"},"score_check":{"default":false,"title":"Score Check","type":"boolean"},"storyboard":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"string"}],"title":"Storyboard"}},"required":["project_dir","storyboard"],"title":"storyboard_validateArguments","type":"object"},"name":"storyboard_validate"},{"description":"Validate and queue a background render.\n\n``storyboard`` is the object or a saved path (``\"storyboards/<name>.json\"``).\n\nUse preview while iterating and final after QC. A rejected storyboard\nreturns validation errors and creates no job.\n","inputSchema":{"properties":{"project_dir":{"title":"Project Dir","type":"string"},"quality":{"default":"final","enum":["final","preview","draft"],"title":"Quality","type":"string"},"storyboard":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"string"}],"title":"Storyboard"}},"required":["project_dir","storyboard"],"title":"render_startArguments","type":"object"},"name":"render_start"},{"description":"Build the matrix of variants of one storyboard: hooks x bodies x calls to action.\n\n``base`` is a storyboard (object or ``\"storyboards/<name>.json\"``). ``variants`` is\n``{axis: [{id, changes}]}`` for up to 3 axes (for example ``hook``, ``body``, ``cta``).\n``changes`` is a list applied in order, each a ``storyboard_patch`` change (``{path,\nvalue}`` or ``{path, remove: true}``) or a SLOT REPLACEMENT ``{replace_label: \"hook\",\nsegments: [...], overlays: [...]}``: it swaps every segment of that label (they must be\nnext to each other) and shifts everything after it by the difference of duration\n(overlays, sounds and word times follow). The new ``overlays`` are timed from the start\nof the slot; the overlays that were on the replaced segments go away. A voice-over\n(``audio.voice``) laid on the timeline must still match: a change of duration while one\nis set is refused with the reason, as is an overlay that only partly overlaps the slot.\nAn option with no ``changes`` (or ``[]``) is the control: the base unchanged. Timed\nsounds follow the slot: an ``sfx`` overlay after it shifts by the difference of duration,\none inside it goes away when the new slot brings its own sounds (else it keeps its\noffset); each variant lists what moved under ``moved``. All the errors of all the\nvariants come back at once (variant, path, message).\n\nMakes the cartesian product (at most 24, each validated), saves each as\n``storyboards/<name>.json`` (``name_pattern`` uses ``{base}`` and the axis names; the\ndefault falls back to the axis ids in order when an axis is not hook or cta) and returns\nthe list with the path, ids, duration and warnings of each, plus a contact sheet: the\nfirst 3 s (top row) and the last 3 s (bottom row, the call to action) of every variant\n(LOOK at it, a hook that does not read at that size will not read in the feed). A base\nthat is itself a variant keeps its ids in the new ones (the manifest keeps\n``hook=h2;cta=ca``). Then ``render_batch`` renders them with a shared cache.\nVary the hook first; keep everything else identical.\n\nA storyboard file that already exists is NEVER overwritten, whoever made it (an earlier\n``variants_build`` included, or a file edited by hand since): the error lists every file\nthat would be replaced. ``overwrite=true`` replaces them all. Renders may be replaced;\nstoryboards may not.\n","inputSchema":{"properties":{"base":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"string"}],"title":"Base"},"contact_sheet":{"default":true,"title":"Contact Sheet","type":"boolean"},"name_pattern":{"default":"{base}_{hook}_{cta}","title":"Name Pattern","type":"string"},"overwrite":{"default":false,"title":"Overwrite","type":"boolean"},"project_dir":{"title":"Project Dir","type":"string"},"variants":{"additionalProperties":true,"title":"Variants","type":"object"}},"required":["project_dir","base","variants"],"title":"variants_buildArguments","type":"object"},"name":"variants_build"},{"description":"Queue ONE background job that renders several storyboards in order.\n\n``quality``: ``final``, ``preview`` or ``draft`` (an alias of ``preview``: half-size\n``*.preview.mp4`` files; the report and the manifest say ``preview``, and the manifest\nhas a ``quality`` column because a preview scores lower than its final).\n\n``storyboards``: objects or saved paths (typically the variants of\n``variants_build``). The segment cache is shared, so a segment used by several variants\n(the body, the end card) is built once: the first render is the slow one. ``formats``\n(any of ``\"9:16\"``, ``\"4:5\"``, ``\"1:1\"``) renders each storyboard in those ratios; when\nomitted each storyboard's own ``formats`` field is used, else it renders as it is. Files\ngo to ``renders/<batch>/`` (``batch`` defaults to ``<first name>_batch``) named\n``<name>[_9x16|_4x5|_1x1].mp4``, and ``renders/<batch>/manifest.csv`` lists them for an\nads manager (file, variant ids, format, duration, score, hook text, CTA text).\n``score`` runs ``ad_score`` on each final render for the manifest (with the safe zones of\nits placement). ``job_status`` shows the progress per render, each output as it\nfinishes, and at the end ``total_seconds``, ``cache_builds`` and the manifest path. A\nstoryboard that does not validate rejects the whole batch with its errors and no job.\n","inputSchema":{"properties":{"batch":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null,"title":"Batch"},"formats":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"default":null,"title":"Formats"},"project_dir":{"title":"Project Dir","type":"string"},"quality":{"default":"final","enum":["final","preview","draft"],"title":"Quality","type":"string"},"score":{"default":true,"title":"Score","type":"boolean"},"storyboards":{"items":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"string"}]},"title":"Storyboards","type":"array"}},"required":["project_dir","storyboards"],"title":"render_batchArguments","type":"object"},"name":"render_batch"},{"description":"Render one storyboard in several formats: ``9:16``, ``4:5``, ``1:1``.\n\n``formats`` defaults to the storyboard's own ``formats`` field, else all three. One\ndetached job (see ``render_batch``), one file per format: ``<name>_9x16.mp4``,\n``<name>_4x5.mp4``, ``<name>_1x1.mp4`` in ``renders/<batch>/`` (``batch`` defaults to\n``<name>_formats``). Each is the same ad laid out for its placement: the footage is\nre-cropped (face-aware with ``focus: \"face\"``, else by ``focus``); a still or an end card\nthat does not fit is shown whole over its blurred copy; captions, stickers and images\nkeep their place by bands (the part the platform leaves free is mapped onto the free part\nof the new frame, 4:5 and 1:1 being the Feed) and are pushed back inside when a block\nwould leave it. An ``info_card`` is placed like an image card: its ``y`` follows the same\nbands, its width and text scale with the frame (the title stays at 38 px or more) and it\nstays inside the frame. ``ad_score`` uses the safe zones of the matching placement\n(``feed`` for 4:5 and 1:1). LOOK at each format's contact sheet before delivery.\n","inputSchema":{"properties":{"batch":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null,"title":"Batch"},"formats":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"default":null,"title":"Formats"},"project_dir":{"title":"Project Dir","type":"string"},"quality":{"default":"final","enum":["final","preview","draft"],"title":"Quality","type":"string"},"score":{"default":true,"title":"Score","type":"boolean"},"storyboard":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"string"}],"title":"Storyboard"}},"required":["project_dir","storyboard"],"title":"render_formatsArguments","type":"object"},"name":"render_formats"},{"description":"Queue a checked voice-over generation job.\n\nPoll job_status until it is done, then use each manifest line's\n``start`` and ``duration`` to place shots. If a line is ``suspect``,\nregenerate it with slightly different wording or accept it when the\ntranscript differs only by punctuation; agents cannot listen to audio.\n``unmatched_words`` lists the key words (4+ letters) missing from the\ntranscript: two or more make the line suspect, so reword them.\nWhen the voice says the end of a line again (2 or more extra words after the whole\ntext) the audio is cut after the last expected word: the line has ``extra_words`` and\n``trimmed_extra: true``; extra words that could not be cut make it ``suspect``.\nA line is a string (said and shown) or ``{\"say\": ..., \"show\": ...}``\nwhen captions must display something other than the spoken words\n(say \"forty-nine dollars ninety\", show \"$49.90\"). Calling again with an\nexisting ``name`` replaces that voice (unchanged lines come from the\ncache); the job summary then has ``replaced: true``. ``language`` in the\nspec is optional: without it the ``language`` of brand.yaml is used,\nelse ``en``.\n","inputSchema":{"properties":{"name":{"title":"Name","type":"string"},"project_dir":{"title":"Project Dir","type":"string"},"spec":{"additionalProperties":true,"title":"Spec","type":"object"}},"required":["project_dir","name","spec"],"title":"voice_generateArguments","type":"object"},"name":"voice_generate"},{"description":"List the sound effects of the project's ``sfx/`` folder, and build the pack.\n\n``fetch=true`` first builds the missing sounds of the pack (about 18: whoosh short and\nlong, swoosh, swipe, pop, click, tap, ding, chime, notification, cash register,\ncamera shutter, record scratch, typing, riser 1 s and 2 s, impact, boom). Each is\ndownloaded from a pinned CC0 source (checked by SHA-1) or synthesised in code, trimmed\nand set to one level, with the source and licence in ``sfx/LICENCES.txt``. A download\nthat fails is synthesised instead (``offline=true`` synthesises all of them). The\nfiles you drop in ``sfx/`` yourself are listed too. Each sound returns its ``name``,\n``path`` (the ``source`` of an ``sfx`` overlay), ``duration`` and ``origin``. Use a\nsound in an ``sfx`` overlay (``{\"type\": \"sfx\", \"source\": \"sfx/pop.wav\", \"at\": 3.2,\n\"volume\": 0.8}``) or by name in ``audio.sfx_auto``. A riser is placed so that its end\nmeets the moment it builds towards: ``at`` = that moment minus its duration.\n","inputSchema":{"properties":{"fetch":{"default":false,"title":"Fetch","type":"boolean"},"offline":{"default":false,"title":"Offline","type":"boolean"},"project_dir":{"title":"Project Dir","type":"string"}},"required":["project_dir"],"title":"sfx_listArguments","type":"object"},"name":"sfx_list"},{"description":"Beat times of a music track, as it will play in the ad.\n\n``path`` is a project file (audio, or a video whose soundtrack is the music). ``start``\nis the storyboard's ``audio.start``: the times are in seconds from the start of the\nad, so beat 0 of the result is the first beat heard. They come from the onset envelope\nand the estimated tempo, on a regular grid whose phase is aligned to the strongest\nonsets (within a few milliseconds on a steady beat). ``duration`` limits the analysis\n(default the first 120 s). A track without a steady beat (a piano, a pad) returns no\nbeats. Cut on these times for a music-led ad, or let ``storyboard_snap`` do it.\n","inputSchema":{"properties":{"duration":{"anyOf":[{"type":"number"},{"type":"null"}],"default":null,"title":"Duration"},"path":{"title":"Path","type":"string"},"project_dir":{"title":"Project Dir","type":"string"},"start":{"default":0.0,"title":"Start","type":"number"}},"required":["project_dir","path"],"title":"music_beatsArguments","type":"object"},"name":"music_beats"},{"description":"Move the cuts of a storyboard onto the beats of its music.\n\n``storyboard`` is the object or a saved path. Each cut within ``max_shift`` seconds\n(default 0.2) of a beat of ``audio.music`` (from ``audio.start``) moves to it: the\n``out`` of the earlier clip (or the ``duration`` of an image) changes, ``in`` points and\nsegment order never do, no segment ends up under 0.5 s (or shorter than it was), the\nother cuts and the total duration stay, and the captions, images and sounds that\nstarted on a moved cut move with it. With ``audio.clips`` the cuts of talking segments\nnever move. The result lists ``moves``, the cuts ``kept`` with the reason, and how many\ncuts are on a beat before and after. It returns the new ``storyboard``, or with\n``save_as`` (a name) writes ``storyboards/<name>.json`` and returns its path instead.\nThe snapped storyboard has its own identity so a render never overwrites the original:\nwith ``save_as`` its ``name`` is ``save_as``, without it the old name plus ``_snapped``,\nand ``output.path`` is ``renders/<that name>.mp4`` (the quality is kept).\nRun ``storyboard_validate`` afterwards: its ``beat_alignment`` info shows the share of\ncuts on a beat.\n","inputSchema":{"properties":{"max_shift":{"default":0.2,"title":"Max Shift","type":"number"},"project_dir":{"title":"Project Dir","type":"string"},"save_as":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null,"title":"Save As"},"storyboard":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"string"}],"title":"Storyboard"},"to":{"const":"beats","default":"beats","title":"To","type":"string"}},"required":["project_dir","storyboard"],"title":"storyboard_snapArguments","type":"object"},"name":"storyboard_snap"},{"description":"Tempo, loudness and energy of the music tracks, to match a reference.\n\nWithout ``path``, profiles every audio file of ``music/``; with ``path``\n(project-relative), one file, which may be a video such as the reference\n(its soundtrack mixes voice and music). Each track returns its duration,\nintegrated loudness (LUFS), estimated tempo (``tempo_bpm``), ``energy``\n(onsets per second and loudness range in LU) and ``feel``: calm, medium or\nenergetic (thresholds in ``feel_thresholds``). Pick the library track whose\nprofile is closest to the reference's: a calm track under a fast reference\nfeels flat.\n","inputSchema":{"properties":{"path":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null,"title":"Path"},"project_dir":{"title":"Project Dir","type":"string"}},"required":["project_dir"],"title":"music_profileArguments","type":"object"},"name":"music_profile"},{"description":"Find music whose licence lets an ad use it (commercial use and modification).\n\nSearches Openverse (no key; ``source=\"openverse\"``), Freesound (``\"freesound\"``, only with\nthe ``FREESOUND_API_KEY`` environment variable) or both (``\"all\"``; without the key the\nanswer says so and still lists Openverse). Kept licences: CC0, PDM, CC BY, CC BY-SA;\nNC and ND are dropped. Each track returns ``source``, ``id``, ``title``, ``author``,\n``licence``, ``duration`` (s), ``source_url``, ``preview_url`` (listen before fetching)\nand ``attribution_required`` (with the ``attribution_text`` to put in the ad's\ndescription). ``mood`` adds words to the query (\"calm\", \"upbeat\"). ``min_duration`` and\n``max_duration`` filter in seconds. ``fit_to=\"storyboard\"`` with ``storyboard`` (a\nproject path such as ``storyboards/summer.json``) ranks for that ad: tracks at least as\nlong as the ad first, then the wanted feel (``audio.music_feel``, or the ``feel`` argument:\ncalm, medium, energetic) against ``fit.feel_guess``, a guess from the track's OWN title,\ntags and genres (``unknown`` when they say nothing; never copied from the wanted feel).\nThe real feel, tempo and loudness come from ``music_fetch``: trust that, not the guess.\nFetch the best ones, listen, and choose.\n","inputSchema":{"properties":{"feel":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null,"title":"Feel"},"fit_to":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null,"title":"Fit To"},"limit":{"default":12,"title":"Limit","type":"integer"},"max_duration":{"anyOf":[{"type":"number"},{"type":"null"}],"default":null,"title":"Max Duration"},"min_duration":{"anyOf":[{"type":"number"},{"type":"null"}],"default":null,"title":"Min Duration"},"mood":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null,"title":"Mood"},"project_dir":{"title":"Project Dir","type":"string"},"query":{"title":"Query","type":"string"},"source":{"default":"openverse","title":"Source","type":"string"},"storyboard":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null,"title":"Storyboard"}},"required":["project_dir","query"],"title":"music_searchArguments","type":"object"},"name":"music_search"},{"description":"Download a track from ``music_search`` into ``music/``, with its licence.\n\n``source`` and ``id`` come from the search result. Writes ``music/<file>``, the record\n``music/<file>.licence.json`` (source, id, URL, title, author, licence, licence URL,\nattribution text, fetch date) and a line in ``music/LICENCES.txt``, then profiles the\ntrack: the answer has ``path`` (the ``audio.music`` value), ``duration``, ``tempo_bpm``,\n``feel`` and ``loudness_lufs``. A licence that is not CC0, PDM, CC BY or CC BY-SA is\nrefused. An embedded cover picture is removed from the stored file. The render and\n``ad_score`` read the record (the sidecar, else the track's line in ``LICENCES.txt``):\n``music_licence_unknown`` when a track has neither,\n``music_attribution_required`` (with the exact text) when it needs one.\nFreesound serves its high-quality MP3 preview (the original needs a login).\n","inputSchema":{"properties":{"id":{"title":"Id","type":"string"},"project_dir":{"title":"Project Dir","type":"string"},"source":{"title":"Source","type":"string"}},"required":["project_dir","source","id"],"title":"music_fetchArguments","type":"object"},"name":"music_fetch"},{"description":"Make an instrumental track locally (optional ACE-Step environment), as a job.\n\nNeeds ``adanvil music-setup`` (about 3 GB of packages, then 8 GB of weights at the first\nrun). ``prompt`` is a list of tags (\"upbeat acoustic guitar, warm, 110 bpm,\ninstrumental\"); ``duration`` 10 to 120 s. On a CPU a 30 s track takes several minutes:\npoll ``job_status``; its ``music`` field has the ``path`` (the ``audio.music`` value),\ntempo, feel and loudness. The model and its weights are Apache-2.0: no attribution; the\nlicence record is written next to the file like for a fetched track.\n","inputSchema":{"properties":{"duration":{"default":30.0,"title":"Duration","type":"number"},"project_dir":{"title":"Project Dir","type":"string"},"prompt":{"title":"Prompt","type":"string"},"seed":{"anyOf":[{"type":"integer"},{"type":"null"}],"default":null,"title":"Seed"},"steps":{"default":27,"title":"Steps","type":"integer"}},"required":["project_dir","prompt"],"title":"music_generateArguments","type":"object"},"name":"music_generate"},{"description":"Read a voice manifest and suggest final-timeline shot boundaries.\n\n``offset`` is the intended voice start on the final video timeline.\nSuspect lines should be regenerated with slightly different wording\nor accepted only when the transcript difference is punctuation.\nEach line's ``unmatched_words`` lists key words the transcript lacks.\n``extra_words`` lists words heard after the whole text (a repeated end): with\n``trimmed_extra`` true the audio was already cut after the last expected word, else\nthe line is ``suspect`` and still ends on them (regenerate it).\n","inputSchema":{"properties":{"name":{"title":"Name","type":"string"},"offset":{"default":0.0,"title":"Offset","type":"number"},"project_dir":{"title":"Project Dir","type":"string"}},"required":["project_dir","name"],"title":"voice_viewArguments","type":"object"},"name":"voice_view"},{"description":"Read a queued, running, completed or failed render, batch, voice, index or refine job.\n\nWith ``wait_seconds`` greater than zero, wait in this call (up to 600\nseconds) instead of polling from the client; if the connection drops,\njust call again, a restarted server still finds the job. Pass\n``project_dir`` when it says \"job not found\". Completed index jobs\ncarry the compact index summary; completed speech_refine jobs carry\n``refine`` (refined clips, skipped clips with the reason, errors). Completed render jobs\ninclude the persisted RenderReport JSON; batch jobs (``render_batch``,\n``render_formats``) carry ``batch``: one entry per render (status, file, format,\nduration, score, seconds, error) as they finish, then ``total_seconds``,\n``cache_builds`` and the ``manifest`` path; completed voice jobs include\neach manifest line and its warnings. If a line is ``suspect``, an\nagent cannot listen to it: regenerate with slightly different wording,\nor accept it when the transcript differs only in punctuation.\n","inputSchema":{"properties":{"job_id":{"title":"Job Id","type":"string"},"project_dir":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null,"title":"Project Dir"},"wait_seconds":{"default":0,"title":"Wait Seconds","type":"number"}},"required":["job_id"],"title":"job_statusArguments","type":"object"},"name":"job_status"},{"description":"Run technical QC on a rendered project-relative video.\n\nPass a job id or saved report path when available. Inspect the returned\nsheet, the end card frame (``end.jpg``) and up to four overlay\ncrops before delivery. ``storyboard`` is the EFFECTIVE storyboard of that render (the\none of its format after the re-layout: ``renders/<batch>/_storyboards/<name>.json``,\nfound by itself next to a batch render): the overlay crops are then taken where its\noverlays really are (a caption moved by ``render_formats`` is not cut in half), and\n``caption_on_face`` checks the rendered frames for a caption on a face (needs the\nvision environment; every format, 9:16 too).\n","inputSchema":{"properties":{"project_dir":{"title":"Project Dir","type":"string"},"render_report":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null,"title":"Render Report"},"storyboard":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"string"},{"type":"null"}],"default":null,"title":"Storyboard"},"video":{"title":"Video","type":"string"}},"required":["project_dir","video"],"title":"qc_runArguments","type":"object"},"name":"qc_run"},{"description":"Score a rendered ad out of 100 for creative quality, with findings to fix.\n\n``qc_run`` says the file is technically correct; this says whether the ad\nis any good: a first second that holds attention (motion or a cut, a face\nor the product, a text within 0.5 s, audio at once), a pacing without a\ndip in the middle, captions that can be read (0.25 s per word + 0.6 s,\n7 words a line at most, contrast of 3:1 or more on the real frames), the\nproblem before the product, a call to action and an end card in the last\n4 s, overlays out of the platform interface (``platforms``: any of\n``tiktok``, ``reels``, ``stories``, ``feed``; the first three by default, ``feed``\nfor a 4:5 or 1:1 video) and a clear\nloudness, a voice 6 dB over the music and no silence over 0.7 s.\nPass the ``storyboard`` it was rendered from (object or saved path) for\nexact timings, words, roles and overlays; without it the checks that\nneed them are listed in ``skipped``. The result has ``score``,\n``sub_scores`` (hook, pacing, reading, story, safe_zones, audio),\n``findings`` sorted by ``impact`` (each with ``time``, ``severity``,\n``message`` and ``fix``), ``passed``, ``skipped``, the pixel boxes of the\n``safe_zones`` and the ``thresholds`` (guidelines, not rules). Images:\n``safe_zones_preview.jpg`` (the zones of each platform over a mid-ad\nframe, red where an overlay falls inside) and the frame of each top\nfinding: LOOK at them. Run it before delivery, fix the top findings,\nrender again, and aim for 80 or more. The texts of an ``info_card`` are read like written\ncaptions (0.25 s per word + 0.6 s) and count for the call to action, like the texts of an\nend card made with ``end_card``; with ``story: \"offer\"`` in the storyboard\n``product_too_early`` is not counted (and ``skipped`` says why).\n","inputSchema":{"properties":{"platforms":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"default":null,"title":"Platforms"},"project_dir":{"title":"Project Dir","type":"string"},"storyboard":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"string"},{"type":"null"}],"default":null,"title":"Storyboard"},"video":{"title":"Video","type":"string"}},"required":["project_dir","video"],"title":"ad_scoreArguments","type":"object"},"name":"ad_score"},{"description":"Measure how different a before and an after look, to rank candidate pairs.\n\n``before`` and ``after`` are project files: images, or clips (the frame\nat ``before_t`` / ``after_t`` seconds, the middle of the clip by default).\n``before_crop`` / ``after_crop`` (``{x, y, w, h}`` in source pixels) cut\none half out of a side-by-side composite, the same crop a ``reveal`` side\ntakes. The comparison is made on the face when a skin-region heuristic\nfinds one in both pictures (so a different distance still lines up), else\non the whole frame after aligning sizes. ``visible_difference`` is 0 to\n100 (under 12 not visible, under 30 subtle, under 55 visible, above that\nobvious at a glance); ``region`` says what was compared. The preview image\nshows the two pictures side by side: LOOK at it. Compare every available\npair (photos, composites split with ``crop``, frames of before/after\nclips) and use the one whose difference is obvious; a still pair of the\nsame pose beats moving clips for a reveal.\n","inputSchema":{"properties":{"after":{"title":"After","type":"string"},"after_crop":{"anyOf":[{"additionalProperties":{"type":"integer"},"type":"object"},{"type":"null"}],"default":null,"title":"After Crop"},"after_t":{"anyOf":[{"type":"number"},{"type":"null"}],"default":null,"title":"After T"},"before":{"title":"Before","type":"string"},"before_crop":{"anyOf":[{"additionalProperties":{"type":"integer"},"type":"object"},{"type":"null"}],"default":null,"title":"Before Crop"},"before_t":{"anyOf":[{"type":"number"},{"type":"null"}],"default":null,"title":"Before T"},"project_dir":{"title":"Project Dir","type":"string"}},"required":["project_dir","before","after"],"title":"compare_pairArguments","type":"object"},"name":"compare_pair"}]}}}
