Skip to main content
Glama
liu-xindi

polylens-bilibili

by liu-xindi

Server Configuration

Describes the environment variables required to run the server.

NameRequiredDescriptionDefault
POLYLENS_BILIBILI_HTTP_HOSTNo监听地址127.0.0.1
POLYLENS_BILIBILI_HTTP_PORTNo监听端口6622
POLYLENS_BILIBILI_TRANSPORTNo传输 stdio/httpstdio
POLYLENS_BILIBILI_PUBLIC_URLNo公网地址
POLYLENS_BILIBILI_AUTH_SECRETNo机主口令
POLYLENS_BILIBILI_INSECURE_NO_AUTHNo允许无鉴权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

CapabilityDetails
tools
{
  "listChanged": false
}
prompts
{
  "listChanged": false
}
resources
{
  "subscribe": false,
  "listChanged": false
}
experimental
{}

Tools

Functions exposed to the LLM to take actions

NameDescription
get_video_infoC

含标题、作者、发布时间、简介与各项统计。

统计口径:评论数含二级评论;弹幕数与整片时长是全部分段之和, 当前段时长只算这一段。

(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 指向的二级评论不在列表里时,那条被平台隐藏了,取不到。 结果缓存 30 分钟,cached_at 是缓存的抓取时间。 image_urls、link_titles 是字符串,多个时以换行分隔。

(comment replies, sub-replies, thread)

get_danmakuC

timestamp 是弹幕在视频中的秒数。

平台可能只给出部分弹幕,少于视频信息里的弹幕数。

(danmaku, bullet comments)

get_subtitlesA

逐句返回。需要登录。字幕可能为 AI 生成或机器翻译,存在误差。

(subtitles, captions, transcript)

get_partsC

即分 P。单段视频返回一项。(video parts, pages)

get_frameA

返回内联 JPEG 图片。需要登录。

(video frame, screenshot)

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_feedB

B 站首页推荐流,每批最多 30 条。

(homepage feed, recommendations, browse)

get_login_statusA

联网向平台核验。

is_login 为 null 表示无法验证,与 false 不同。

(login status)

logoutA

删除本地保存的凭据。(log out, sign out)

start_qr_loginA

返回内联二维码图片。不写入本地凭据,由 complete_qr_login 写入。

(QR code login)

complete_qr_loginC

取回凭据并写入本地。

(finish QR code login, poll QR status)

Prompts

Interactive templates invoked by user choice

NameDescription

No prompts

Resources

Contextual data attached and managed by the client

NameDescription

No resources

TDQS

A3.5/5.0

Scored across 16 tools

Disambiguation5/5

Each tool targets a clearly distinct resource or action: video info vs. parts vs. frame vs. subtitles vs. danmaku are separated, and get_comments vs. get_comment_replies are explicitly differentiated (top-level vs. sub-replies). The login cluster (start_qr_login, complete_qr_login, get_login_status, logout) has separable roles despite sharing the auth theme. No tool appears to duplicate another.

Naming Consistency5/5

Nearly all tools follow a clean verb_noun pattern (get_comments, get_video_info, search_videos, list_up_videos, get_up_info, get_feed, get_login_status, get_danmaku, suggest_keywords). The only deviations, logout and the start/complete_qr_login pair, are standard idioms that remain predictable.

Tool Count4/5

16 tools is reasonable for a Bilibili content surface spanning auth, video data, and discovery, and each tool maps to a genuine operation. It sits near the upper end of comfortable scoping but does not feel padded.

Completeness4/5

Coverage is broad: auth lifecycle, video metadata, comments/replies, danmaku, subtitles, parts, frames, search, suggestions, feed, and uploader info. Gaps are minor — no write/interaction operations (like, favorite, follow) or related-video lookup — but core read workflows are fully supported.

Maintenance

ActivityMaintained
ResponsivenessNo issues