Skip to main content
Glama
XZXZZX-Ai

Bilibili Mcp Server Unofficial(video Subtitles And Comments)

by XZXZZX-Ai

get_video_transcript

Extract Bilibili video subtitles as plain text, with options for time-range filtering, keyword search, and multi-part selection.

Instructions

获取 Bilibili 视频纯字幕文本(按行合并)。支持分集选择、时间戳输出、时间区间过滤和可选关键词搜索。不自动降级到描述;仅在 fallback_to_description 为 true 且字幕不可用时返回视频描述。关键词搜索与描述降级不兼容。Requires Bilibili Cookie for reliable subtitle access. If unavailable, call get_credential_setup_instructions.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
pageNo可选,多P视频的分集编号(从1开始的正整数)。不指定时使用默认Part。
queryNo可选,关键词搜索。大小写不敏感的字面匹配。非空且最多100字符。与 description 降级不兼容。
bvid_or_urlYesBilibili 视频 BV 号或完整 URL
end_secondsNo可选,字幕区间结束秒数(非负整数或小数)。只返回 from <= end_seconds 的字幕段。当同时提供 start_seconds 和 end_seconds 时需 end_seconds >= start_seconds。
max_matchesNo可选,最大返回匹配数(1-20,默认10)。仅在 query 存在时生效。
start_secondsNo可选,字幕区间起始秒数(非负整数或小数)。只返回 to >= start_seconds 的字幕段。
preferred_langNo可选,指定偏好字幕语言代码,如 'zh-Hans', 'en' 等。
context_segmentsNo可选,每个匹配前后的字幕段上下文数量(0-5,默认1)。仅在 query 存在时生效。
include_timestampsNo可选,为每行字幕添加 [HH:MM:SS --> HH:MM:SS] 时间戳前缀。默认 false。
fallback_to_descriptionNo字幕不可用时是否降级为视频描述文本。默认 false。与时间戳/区间过滤器不兼容。

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
bvidYes
pageNo
queryNo
titleYes
matchesNo
languageNo
truncatedNo
source_urlYes
transcriptYes
data_sourceYes
total_matchesNo
returned_matchesNo
Behavior4/5

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

With no annotations, description discloses key behaviors: requires Bilibili Cookie for reliability, fallback to description when enabled and subtitles unavailable, and incompatibilities between options. No contradictions.

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?

Concise at ~6 sentences, front-loaded with core purpose. Every sentence adds information. Could be slightly more compact but no waste.

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?

Covers all major features and constraints (multi-part, timestamps, time range, keyword search, fallback, cookie requirement). Output schema exists so return format need not be detailed. Minor omission: no mention of pagination or max results beyond query context.

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

Parameters4/5

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

Schema coverage is 100%, but description adds value by summarizing parameter roles (e.g., '多P视频的分集编号') and noting interactions like keyword search incompatible with description fallback. Avoids redundancy.

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 description clearly states the tool retrieves Bilibili video subtitle text merged by lines. It lists supported features (multi-part selection, timestamps, time filtering, keyword search) and distinguishes from siblings like get_video_info.

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?

Explicitly mentions when to use (getting subtitles) and points to get_credential_setup_instructions if cookies are needed. Notes incompatibilities with fallback and filters. Could be improved by explicitly stating when not to use.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/XZXZZX-Ai/bilibili-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server