Skip to main content
Glama
bilibili-agent-mcp
by Gsxcheng

下载视频 / 音频 / 弹幕 / 字幕 / 封面

bili_download

Download Bilibili videos or audio to your local machine, with optional ffmpeg DASH merging and extras like cover, danmaku, subtitles, and metadata; background jobs return a task ID for status checks.

Instructions

把视频下载到本机(默认 ~/Downloads/bilibili,可用 BILIBILI_DOWNLOAD_DIR 修改)。DASH 音视频会用 ffmpeg 自动合并为 mp4 并写入章节元数据;没有 ffmpeg 时保留分离文件。可附带下载封面、ASS/XML 弹幕、SRT 字幕。任务在后台运行,超过 wait_seconds 未完成会先返回任务 ID,之后用 bili_download_status 查询。对应 Bilibili-Evolved 的「下载视频」「下载音频」「下载弹幕」「下载字幕」「查看封面」。

Input Schema

NameRequiredDescriptionDefault
modeNovideo=音视频;audio=仅音频;none=只下附加内容video
codecNo偏好编码,默认 avc
inputYes视频标识:B站视频/番剧链接、BV号、av号、ep号、ss号或 b23.tv 短链
mergeNo是否用 ffmpeg 合并音视频,默认 true
pagesNo要下载的分P序号列表(批量下载);不填则只下载链接对应的那一P
extrasNo附带下载:封面、ASS 弹幕、XML 弹幕、SRT 字幕、ffmetadata 元数据
qualityNo清晰度代码,同 bili_video_streams;默认最高可用
wait_secondsNo最多等待多少秒再返回(上限 90,远程模式下避免网关超时);0 表示立即返回任务 ID

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.1/5.0
Behavior4/5

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

Beyond the annotations it discloses the concrete output location (~/Downloads/bilibili, overridable via BILIBILI_DOWNLOAD_DIR), the ffmpeg merge-and-chapter-metadata behavior, and the graceful fallback to separate files when ffmpeg is absent — none of which the annotations convey. It still leaves out whether files are overwritten on re-download, whether login/cookies are required, and any rate-limit behavior for batch pages.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description leads with the action and destination, then layers merge behavior, extras, and the async/status flow in a logical order with no filler. It is dense but each clause (directory override, ffmpeg fallback, task ID handoff) carries actionable information; only the closing Bilibili-Evolved naming is low-value padding.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For an 8-parameter tool with no output schema, it covers the essentials an agent needs: where files land, how merging behaves, and how the async return is used. It doesn't describe the shape of the immediate response (e.g., task ID field name, progress fields) which matters when wait_seconds is 0, leaving a small gap before the bili_download_status handoff.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100%, so every parameter including mode, codec, pages and wait_seconds already carries its own explanation; the description adds no parameter-level detail beyond restating the ffmpeg merge and the wait_seconds timeout behavior. That meets the baseline for a fully documented schema but doesn't improve on it.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The first sentence states a specific verb (下载到本机) plus resource and destination, and the tool's scope is further sharpened by naming which artifacts it can fetch (视频/音频/封面/弹幕/字幕). It is clearly distinguishable from siblings like bili_danmaku or bili_subtitles because it frames them as optional extras of a single download job, and from bili_download_status because it names that tool as the follow-up.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

It explicitly says the task runs in the background, that exceeding wait_seconds returns a task ID, and that bili_download_status is the way to check afterwards — a clear usage path. What's missing is routing guidance versus the dedicated siblings (bili_danmaku, bili_subtitles, bili_chapters) when the user only wants danmaku/subtitles, and any note on prerequisites such as login for high qualities.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.