polylens-bilibili
Server Configuration
Describes the environment variables required to run the server.
| Name | Required | Description | Default |
|---|---|---|---|
| POLYLENS_BILIBILI_HTTP_HOST | No | 监听地址 | 127.0.0.1 |
| POLYLENS_BILIBILI_HTTP_PORT | No | 监听端口 | 6622 |
| POLYLENS_BILIBILI_TRANSPORT | No | 传输 stdio/http | stdio |
| POLYLENS_BILIBILI_PUBLIC_URL | No | 公网地址 | |
| POLYLENS_BILIBILI_AUTH_SECRET | No | 机主口令 | |
| POLYLENS_BILIBILI_INSECURE_NO_AUTH | No | 允许无鉴权 | false |
Instructions
Guidance the server publishes about itself, which clients place ahead of the tool catalog so the model reads it before choosing anything.
This server publishes no instructions, or was last inspected before Glama recorded them.
Capabilities
Features and capabilities supported by this server
Protocol revision2025-11-25
| Capability | Details |
|---|---|
| tools | {
"listChanged": false
} |
| prompts | {
"listChanged": false
} |
| resources | {
"subscribe": false,
"listChanged": false
} |
| experimental | {} |
Tools
Functions exposed to the LLM to take actions
| Name | Description |
|---|---|
| get_video_infoB | 含标题、作者、发布时间、简介与各项统计。 统计口径:评论数含二级评论;弹幕数与整片时长是全部分段之和, 当前段时长只算这一段。单段视频忽略 ?p=,current_page 为空。 staff 仅联合投稿有值,格式为"名字(角色,mid)",以分号分隔。 (video info, metadata, stats) |
| get_commentsA | 不含二级评论,二级评论通过 get_comment_replies 获取。 image_urls、link_titles 是字符串,多个时以换行分隔。 (video comments) |
| get_comment_repliesA | 二级评论按时间正序排列。 total 是该主评论下平台能列出的二级评论总数,可用来算页数。 withheld 是该主评论下平台未列出的二级评论条数(已删除或被折叠)。 某条主评论取不到(评论不存在、不属于这个视频)时只在它的 error 里说明,其他照常返回。 中途被风控或限流时,已取完的照常返回,其余的 error 里说明原因。 parent_id 为空表示直接回复主评论,否则是所回复的那条二级评论的 id。 parent_id 指向的二级评论不在列表里时,那条被平台隐藏了,取不到。 除 jq 外参数相同的调用返回同一结果,from_cache 表示是否来自缓存; 被限速的不完整结果不缓存,要新数据用 refresh。 调用没收到结果时服务端仍会取完,之后用相同参数再取直接用缓存。 image_urls、link_titles 是字符串,多个时以换行分隔。 (comment replies, sub-replies, thread) |
| get_subtitlesC | 逐句返回。字幕可能为 AI 生成或机器翻译,存在误差。 (subtitles, captions, transcript) |
| get_partsC | 即分 P,每个视频一组。单段视频返回一项。(video parts, pages) |
| get_danmaku_countsA | 每个视频一组,每段一行,段号看 page。不写 ?p= 取全部分段。 danmaku_count 由平台封顶,分段越长上限越高(如约 8 分钟的为 2000、约 30 分钟的 为 6000、45 分钟以上的为 12000),达到上限时实际弹幕更多。 按段缓存,cached_at 非空表示来自缓存及其抓取时间,要新数据用 refresh。 调用没收到结果时服务端仍会取完,之后再取直接用缓存。 (danmaku count per part) |
| search_videosA | 每批最多 30 条,最多翻 30 批。 结果已滤掉付费课程,一批可能不满 30 条。summary 是平台截断过的简介, 完整简介通过 get_video_info 获取。 (search videos, find video by keyword) |
| suggest_keywordsA | B 站搜索框的联想词,最多 10 条。 平台联想时会忽略 + # 等符号。 (search suggestions, autocomplete, related keywords) |
| list_up_videosB | 每批最多 40 条。total 是视频总数,带 keyword 时为匹配数。 (uploader videos, channel uploads, other videos by this author) |
| get_up_infoC | 含昵称、签名、等级、粉丝数、关注数、总获赞、认证、大会员等。 (uploader profile, channel info, followers) |
| get_feedA | B 站首页推荐流,每批最多 30 条。 (homepage feed, recommendations, browse) |
| get_login_statusB | 联网向平台核验。 is_login 为 null 表示无法验证,与 false 不同。 (login status) |
| get_versionB | 本说明对应版本 0.13.0。running 与之不同表示工具说明是旧缓存:可把 0.13.0 传入 since 查看之后的用法变化。工具定义里没有的参数也可照传;工具列表里没有的工具需重连才能使用。running 低于 latest 表示服务未升级。latest 查不到时为 null。(server version) |
| logoutB | 删除本地保存的凭据。(log out, sign out) |
| start_qr_loginA | 返回内联二维码图片和对应的链接 url。不写入本地凭据,由 complete_qr_login 写入。 (QR code login) |
| complete_qr_loginC | 取回凭据并写入本地。 (finish QR code login, poll QR status) |
Prompts
Interactive templates invoked by user choice
| Name | Description |
|---|---|
No prompts | |
Resources
Contextual data attached and managed by the client
| Name | Description |
|---|---|
No resources | |
TDQS
Scored across 16 tools
Each tool targets a distinct resource or action: search/discovery (suggest_keywords, search_videos, get_feed, list_up_videos), video facets (info, parts, subtitles, danmaku counts), comments (top-level vs replies), user profile, and a clean login lifecycle. The descriptions clarify boundaries (e.g. suggest_keywords is autocomplete, search_videos does actual search), so an agent should select correctly.
All names are snake_case and verb-first (get_, list_, search_, suggest_, start_, complete_), with only the natural exception of logout. The pattern is predictable and readable throughout.
16 tools is slightly above the ideal 3-15 band but justified by the broad domain (search, video metadata, comments, replies, subtitles, parts, danmaku, user, feed, login). No obvious filler tools; each has a role.
Core read paths (search, video info, comments/replies, subtitles, parts, danmaku counts, user, feed, login) are covered, but notable gaps exist: no danmaku content retrieval despite counts, no write actions (post comment), no account-specific reads (favorites/history/following), and no video stream URL. These will cause dead ends for agents expecting a full Bilibili client.