bilibili-huasheng-video

v0.6.2
io.github.superlcr/bilibili-huasheng-video Checked 4 days ago Published 1 month ago

Turn a script into a finished video with Huasheng: storyboard, narration, footage, export.

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

huasheng_login Sign in to Huasheng

Has the user sign in to Huasheng in their browser. It opens a Bilibili authorisation page where they click to approve. **Their password stays in their own browser — this tool never sees it and it never passes through us.** Only an authorisation token comes back. Use it when another tool reports NO_CREDENTIAL or an expired session. It waits up to 3 minutes; a timeout just means they did not click, so offer to try again.

huasheng_get_account Check credits and sign-in status

Shows the credit balance and when the next batch of credits expires. Use it before starting work to check there is enough, or to confirm the situation when another tool reports low credits or no sign-in. Note that credits are not only spent on producing a video — at zero, even a one-word edit is refused. Changes nothing.

huasheng_create_project Start a new video (free)

Hands a one-line idea or a full script to Huasheng and starts a video. **Starting a video is free** — credits are only spent later, when the storyboard is approved. Afterwards you normally call huasheng_wait_for_project while it plans or asks a question. Do not infer a narrator voice from the topic, language, audience, or tone. Omit voice unless the user explicitly supplied an exact voice already available in their Huasheng account. **This is not idempotent**: calling it twice with the same arguments makes two videos. After a timeout or an error with an unknown outcome, do not retry automati…

ParameterTypeDescription
script *stringA one-line idea or a complete script — both go here. Huasheng reads it and decides how to proceed
aspectstringLandscape or portrait. Omit for the default
material_urlsarrayFootage to offer: publicly downloadable video or image URLs that need no login. They are added to the user's footage library and attached to this video. This is a pool to choose from, **not a requirem…
style_notestringA style note for this video only, such as "plain-spoken, slightly fast". It does not affect other videos
voicestringAn exact narrator voice name already available in this account. Never infer one from gender, topic, language, audience, or tone; omit for the default

huasheng_answer_question Answer Huasheng’s question

Answers a question Huasheng asked. You may choose when the user's requested outcome gives you enough latitude; otherwise show the complete question and its options in text and stop for the user. If options are given, pass back the full text of one of them; without options, answer freely. **Huasheng accepts a batch of questions only as a whole.** Pass one answer per question, in the same order the questions came in: one entry when the result showed question, and one entry for every item of questions when it showed several. A partial batch is rejected and nothing is recorded, so never answer som…

ParameterTypeDescription
answers *arrayOne answer per question, in the order the questions were given — one entry for a single question, or one entry for every item of the result's questions array. For a multiple-choice question pass the…
client_action_idstringMCP App only: stable id for this user submission. Reuse it when retrying the same click
pidintegerThe 15-digit video id. Omit it to use the current video on this machine.
ui_langstringMCP App only: interface language, used for the follow-up user message

huasheng_ask_agent Ask Huasheng for a change

Asks Huasheng for a change in your own words — "make it livelier", "cut it to a minute", "try a different opening". **This is not how you answer a question.** When the video is PAUSED waiting on you, use huasheng_answer_question; using this instead leaves the question hanging forever. To reword one specific clip, huasheng_edit_clip is faster and more precise — this tool handles open-ended requests. Set clip or animation to anchor words such as 'this' and 'here' to one exact storyboard item. Never set both. Follow it with huasheng_wait_for_project.

ParameterTypeDescription
request *stringWhat to change, in the user's own words
animationintegerOptional animation id from huasheng_list_clips; cannot be combined with clip
clipintegerOptional 1-based clip position from huasheng_list_clips; cannot be combined with animation
pidintegerThe 15-digit video id. Omit it to use the current video on this machine.

huasheng_edit_clip Edit the storyboard

Edits the storyboard: reword, add, remove, split, merge, rebuild or re-record a clip. Clips are numbered **from 1** — use huasheng_list_clips to see the numbers. **applied=false is not a failure**: the change was accepted and is still being applied. Do not retry on it (that submits twice); track action.operation.id with huasheng_wait_for_action until terminal. Mistakes are recoverable with huasheng_list_project_versions. For split, merge and insertion, pass target as described below instead of guessing hidden clip ids.

ParameterTypeDescription
action *stringThe reversible storyboard operation to perform
client_action_idstringMCP App only: stable id for this user submission. Reuse it when retrying the same click
clipintegerThe main clip, counting from 1. Omit only when adding at the end
expected_revisionintegerVersion shown by the card. If the clip changed since then, the write is rejected instead of overwriting it
pidintegerThe 15-digit video id. Omit it to use the current video on this machine.
targetobjectFor add: {before: n} or {after: n}; for split: {line: n}; for merge: {into: n}
textstringNarration for edit/add, or optional pronunciation text for redub
ui_langstringMCP App only: interface language, used for the follow-up user message

huasheng_get_style View the video title, look, and sound

Shows the project title and presentation settings: aspect ratio, narrator voice, speaking pace, subtitles, background music and volume. Omit setting to list everything, or pass one setting to see its current value and accepted choices. Changes nothing. Use huasheng_set_style only after deciding a concrete new value.

ParameterTypeDescription
pidintegerThe 15-digit video id. Omit it to use the current video on this machine.
settingstringOne setting to inspect. Omit to list all settings

huasheng_set_style Change the video title, look, and sound

Changes the project title and presentation: aspect ratio, narrator voice, speaking pace, subtitles and their size and colour, background music and volume. Both setting and value are required. If you need the current value or accepted choices, call huasheng_get_style first. Calling this twice with the same arguments is safe.

ParameterTypeDescription
setting *stringWhich setting to change
value *stringWhat to change it to
client_action_idstringMCP App only: stable id for this user submission. Reuse it when retrying the same click
pidintegerThe 15-digit video id. Omit it to use the current video on this machine.
ui_langstringMCP App only: interface language, used for the follow-up user message

huasheng_confirm_plan Approve the storyboard · spends credits, not refundable

Approves the storyboard and starts production. **This spends credits and they are not refundable.** It covers both ways Huasheng asks for approval: PLAN_READY, and PAUSED where it asks as a question. Before calling it, inspect plan_requirements and cost_points from the latest project status. You may approve directly when that is a reasonable execution of the user's delegated goal. Otherwise show both in text and stop for the user. Never request a blind approval. Production begins immediately. First track the returned action.operation.id with huasheng_wait_for_action until the approval is autho…

ParameterTypeDescription
client_action_idstringMCP App only: stable id for this user submission. Reuse it when retrying the same click
pidintegerThe 15-digit video id. Omit it to use the current video on this machine.
ui_langstringMCP App only: interface language, used for the follow-up user message

huasheng_export_video Export the finished video

Exports the finished video and returns a download link; with save_to it also saves it to that path on this machine. Use it only when the current user request asks to deliver, download, export, or publish the video; READY only means exporting is possible and does not authorize it. **Exporting changes nothing and can be repeated safely.** It takes a little while; this tool waits up to timeout_s seconds and returns pending=true if it has not finished. That is not a failure — track action.operation.id with huasheng_wait_for_action; do not call this write again. task_id exists only to recover an…

ParameterTypeDescription
client_action_idstringMCP App only: stable id for this user submission. Reuse it when retrying the same click
pidintegerThe 15-digit video id. Omit it to use the current video on this machine.
save_tostringWhere to save it on this machine, for example ./out.mp4. Omit for a download link only
task_idstringExisting export task id for recovery after an MCP server restart; normally use wait_for_action
timeout_sintegerHow long to wait this call, in seconds. Default 120
ui_langstringMCP App only: interface language, used for the follow-up user message

huasheng_publish_video Publish to Bilibili · public and permanent

Publishes the video to the user's own Bilibili channel. **It appears on their channel and enters review, and this cannot be undone.** Before calling it, use huasheng_export_video to get a link so the user can watch it, and confirm the title with them. **Publishing is not idempotent** — do not retry on failure or timeout, because that can post it twice. Have the user check their uploads first.

ParameterTypeDescription
title *stringThe title to publish under
coverstringThumbnail URL. Omit to use the one from the export
pidintegerThe 15-digit video id. Omit it to use the current video on this machine.
tagsarrayA few tags

huasheng_list_projects Find Huasheng videos

Lists recent Huasheng videos, newest first. With query, searches every project in the account by title or original script, so a result is never limited to one backend page. Returns the newest limit matches; when has_more is true, pass next_cursor back to continue the same result set — but only when the user actually asked for the complete list, since dumping every link into the conversation answers nothing. Use it when the user means some other video and names or describes it, instead of asking them for a 15-digit pid. Do not use it to guess which video they are on right now: it orders by re…

ParameterTypeDescription
cursorstringOpaque next_cursor from a previous call, to continue that same result set. It already carries the query and time window, so do not resend them alongside it.
limitintegerHow many videos to return, default 20
querystringOptional title or script text to search across every project
since_daysintegerOnly consider videos created in the last N days. No default: without it every video in the account is searched. Pass it only when the user asked for a time range.

huasheng_delete_project Permanently delete a Huasheng video

Permanently deletes one Huasheng video. It disappears from the user's project list, cannot be restored through the public product, and credits already spent are not refunded. Use huasheng_get_project first, name the exact video to the user, and let the host ask for confirmation before calling this tool.

ParameterTypeDescription
pid *integerThe 15-digit id of the video to delete
client_action_idstringMCP App only: stable id for this user submission. Reuse it when retrying the same click
ui_langstringMCP App only: interface language, used for the follow-up user message

huasheng_list_project_versions View editing history

Lists the project's fine-grained checkpoints and saved s-version rounds. Changes nothing. Use huasheng_set_project_version to undo, redo, or restore one of the returned rounds.

ParameterTypeDescription
pidintegerThe 15-digit video id. Omit it to use the current video on this machine.

huasheng_set_project_version Undo, redo, or restore a project version

Changes the project to another editing state. undo and redo move one fine-grained step; goto atomically restores a saved s-version returned by huasheng_list_project_versions. Every successful change returns the authoritative current version.

ParameterTypeDescription
action *stringVersion change
client_action_idstringMCP App only: stable id for this user submission. Reuse it when retrying the same click
pidintegerThe 15-digit video id. Omit it to use the current video on this machine.
ui_langstringMCP App only: interface language, used for the follow-up user message
versionintegerRequired s-version when action=goto

huasheng_list_materials View the footage library

Lists footage files and folders in the user's Huasheng library. Changes nothing. Pass folder_id to open one folder; omit it for the top level.

ParameterTypeDescription
folder_idintegerFolder to list; omit for top level

huasheng_manage_materials Import or organise footage

Imports footage by public URL or organises the user's Huasheng footage library. Huasheng analyses a newly imported file before it is ready. Local-file upload is not claimed here: the public service only exposes reliable server-side import by URL. Use huasheng_list_materials to inspect the library. Permanent deletion uses huasheng_delete_materials so the host can show the right warning.

ParameterTypeDescription
action *stringLibrary operation
client_action_idstringMCP App only: stable id for this user submission. Reuse it when retrying the same click
folder_idintegerFolder to list, rename, or move into; 0 is top level
idsarrayMaterial ids for move
namestringFile or folder name
ui_langstringMCP App only: interface language, used for the follow-up user message
urlstringPublic http(s) URL for add

huasheng_delete_materials Permanently delete Huasheng footage

Permanently deletes footage files or one folder from the Huasheng library. This cannot be undone. List the library first, name exactly what will be removed, and let the host ask the user for confirmation before calling this tool.

ParameterTypeDescription
kind *stringWhat to delete
client_action_idstringMCP App only: stable id for this user submission. Reuse it when retrying the same click
folder_idintegerFolder id when kind=folder
idsarrayMaterial ids when kind=files
ui_langstringMCP App only: interface language, used for the follow-up user message

huasheng_list_preferences View saved creative preferences

Lists the user's reusable creative preferences, or returns one full preference when id is given. Changes nothing. Preferences affect projects started afterwards.

ParameterTypeDescription
idintegerOne preference id; omit to list all

huasheng_save_preference Create or update a creative preference

Creates a reusable creative preference when id is omitted, or updates that preference when id is given. Creating requires name and content. Editing changes only fields supplied. This does not rewrite a project already in progress.

ParameterTypeDescription
client_action_idstringMCP App only: stable id for this user submission. Reuse it when retrying the same click
contentstringPreference instructions; required when creating
idintegerPreference id to update; omit to create
namestringPreference name; required when creating
ui_langstringMCP App only: interface language, used for the follow-up user message

huasheng_delete_preference Permanently delete a Huasheng preference

Permanently deletes one saved creative preference. This cannot be undone. Read the preference first, name it to the user, and let the host ask for confirmation before calling this tool.

ParameterTypeDescription
id *integerSaved preference id
client_action_idstringMCP App only: stable id for this user submission. Reuse it when retrying the same click
ui_langstringMCP App only: interface language, used for the follow-up user message

huasheng_enable_fast_mode Enable priority processing · may spend credits and be irreversible

Moves a project to priority processing. Before production is queued this is a reversible planning choice; after it is queued, upgrading may spend the quoted credits and cannot be undone. The annotation therefore uses the riskier case. Call huasheng_get_project first and tell the user the current wait and fast_upgrade_cost_points before enabling it.

ParameterTypeDescription
client_action_idstringMCP App only: stable id for this user submission. Reuse it when retrying the same click
pidintegerThe 15-digit video id. Omit it to use the current video on this machine.
ui_langstringMCP App only: interface language, used for the follow-up user message

huasheng_disable_fast_mode Use standard queue processing

Turns off priority processing when Huasheng still allows that choice. It never refunds a completed paid upgrade and the service refuses disabling an irreversible queued upgrade. Calling this twice has the same result.

ParameterTypeDescription
client_action_idstringMCP App only: stable id for this user submission. Reuse it when retrying the same click
pidintegerThe 15-digit video id. Omit it to use the current video on this machine.
ui_langstringMCP App only: interface language, used for the follow-up user message

huasheng_get_project Check on a video

Checks project-level state: what Huasheng is doing, whether a question or approval is waiting, what it would cost, and whether an action is required to progress. Use it to answer status, progress, decision and price questions. It does not return the storyboard and does not open the editing workspace; use huasheng_list_clips for clip facts. It returns all project-level state needed for those questions in one call. Changes nothing.

ParameterTypeDescription
detailstringconcise (default) gives state and any required next action; full adds running detail
pidintegerThe 15-digit video id. Omit it to use the current video on this machine.

huasheng_wait_for_action Track a change made in a Huasheng card

Waits for one submitted MCP App action to reach an authoritative result. Pass operation.id from the action receipt. If phase remains PROCESSING, call again with the same operation_id; do not repeat the original write. This tool never renders a new card.

ParameterTypeDescription
operation_id *stringoperation.id from an action receipt
timeout_sintegerHow long to wait in this call. Default 30 seconds

huasheng_wait_for_project Wait for project attention

Blocks until the video reaches an attention or terminal state (a question is waiting / the storyboard needs approval / the video is ready / it failed), or until the time runs out. These states do not all require a user decision. Use it after anything that sets Huasheng working. **timed_out=true is not a failure**, only "not this time round" — read eta_s to decide whether to call again or to tell the user roughly how long is left. If the state needs user input, show the question or the plan in text and stop; the state alone is not permission to answer for the user.

ParameterTypeDescription
pidintegerThe 15-digit video id. Omit it to use the current video on this machine.
timeout_sintegerHow long to wait this call, in seconds, up to 60. Returns timed_out=true otherwise

huasheng_list_clips List the clips

Lists every clip in the video: its position, its narration, and whether it has footage yet. Use it when you need the clip data yourself — to quote the narration, to find which clip the user means, or before editing one. **This is also how you find out what is wrong with a video.** A clip that did not come out right carries health, trouble and fix_by, and the broken clip numbers are listed together in clips_in_trouble. fix_by comes from Huasheng itself, not from guessing: swap_footage means inspect choices with huasheng_list_footage_candidates and apply one with huasheng_replace_clip_footage;…

ParameterTypeDescription
detailstringfull (default) adds length, footage and opaque media references for the visual timeline; concise gives only positions and narration
pidintegerThe 15-digit video id. Omit it to use the current video on this machine.

huasheng_list_footage_candidates View alternative footage for one clip

Shows alternative footage for **one** clip without changing it. Every candidate comes back as an image labelled with its number, and **looking at those images is the only way to know what the footage shows** — the data carries no description of the picture. This is the AI inspection path and never opens a card. If the user should choose visually, use huasheng_choose_footage instead. After choosing, call huasheng_replace_clip_footage with that candidate's choice value **exactly as given**. **Judge them in this order:** (1) **Does the picture show what this clip's narration is talking about**…

ParameterTypeDescription
clip *integerWhich clip, counting from 1
fromstringWhere to look. agent (default) is the set Huasheng originally found; similar and samesource widen the search around the footage in use
pidintegerThe 15-digit video id. Omit it to use the current video on this machine.

huasheng_replace_clip_footage Replace the footage on one clip

Replaces one clip's footage with a choice returned by huasheng_list_footage_candidates. Pass choice exactly as returned — never pass the visible position because the list can reorder after a swap. If the receipt is not terminal, track its operation.id with huasheng_wait_for_action instead of repeating this write.

ParameterTypeDescription
choice *stringCandidate choice copied exactly from the list tool
clip *integerWhich clip, counting from 1
client_action_idstringMCP App only: stable id for this user submission. Reuse it when retrying the same click
expected_revisionintegerVersion shown by the card. If the clip changed since then, the write is rejected instead of overwriting it
fromstringThe same candidate source used when listing, default agent
pidintegerThe 15-digit video id. Omit it to use the current video on this machine.
ui_langstringMCP App only: interface language, used for the follow-up user message
wait_sintegerWait up to this many seconds for the replacement to land; default 0

huasheng_set_animation_visibility Show or hide a motion-graphics overlay

Shows or hides one of the animated overlays. huasheng_list_clips with detail="full" lists them, with the clips each one covers. **Their content cannot be changed and they cannot be regenerated or replaced** — Huasheng does not offer that for videos made this way, so do not try. Hiding one keeps it around; it just stops appearing in the video. To change what an animation says, ask Huasheng itself with huasheng_ask_agent. A successful show/hide response completes that request: do not inspect other animations or export the video unless the user also asked for it.

ParameterTypeDescription
animation *integerIts id, from the animations list in huasheng_list_clips
visible *booleantrue shows it, false hides it
client_action_idstringMCP App only: stable id for this user submission. Reuse it when retrying the same click
pidintegerThe 15-digit video id. Omit it to use the current video on this machine.
ui_langstringMCP App only: interface language, used for the follow-up user message