Skip to main content
Glama
polylens-bilibili

polylens-bilibili

by liu-xindi

get_danmaku_counts

Read-only

Retrieve per-part danmaku counts for Bilibili videos, with optional refresh to update cached results and get current data.

Instructions

每个视频一组,每段一行,段号看 page。不写 ?p= 取全部分段。

danmaku_count 由平台封顶,分段越长上限越高(如约 8 分钟的为 2000、约 30 分钟的 为 6000、45 分钟以上的为 12000),达到上限时实际弹幕更多。 按段缓存,cached_at 非空表示来自缓存及其抓取时间,要新数据用 refresh。 调用没收到结果时服务端仍会取完,之后再取直接用缓存。

(danmaku count per part)

Input Schema

NameRequiredDescriptionDefault
jqYes必填的 jq 表达式。输入是单个视频的分段组成的数组,每条字段:page,part,duration,danmaku_count,cached_at,error。结果为字符串时原样返回,其他结果编码为表格或 JSON;结果为数组时 jq_count 是其长度。
videosYes视频列表,每项为链接、b23.tv 短链或裸 BV/av 号。?p= 可写单段或范围,如 ?p=3、?p=1-12、?p=1-3,7。
refreshNo跳过缓存重新取,并更新缓存。
descriptionYes格式为 工具名:目的。

Output Schema

NameRequiredDescriptionDefault
resultsYes
elapsed_sNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv0.12.1

TDQS

A3.9/5.0
Behavior5/5

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

The description discloses behavior far beyond the readOnly/openWorld annotations: platform caps on danmaku_count that scale with part duration, per-part caching with cached_at semantics, refresh to bypass cache, and the non-obvious fact that the server finishes fetching even when the caller receives no result (with the next call served from cache). This is exactly the kind of operational context an agent cannot infer from structured fields.

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?

Content is dense and mostly front-loaded: output layout first, then caps, then caching, then the timeout caveat. Every sentence carries information, though the cap examples and cache prose are somewhat verbose and the layout is a loose bullet-like stream rather than tight prose.

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?

An output schema exists, yet the description usefully complements it by explaining caching fields and cap semantics that the schema cannot convey. For a read-only, open-world fetch tool the coverage is nearly complete; only explicit sibling differentiation is missing.

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 the baseline is 3. The description's mention of ?p= and refresh restates what the schema already documents ('?p= 可写单段或范围'; '跳过缓存重新取'), so it adds little parameter meaning beyond the schema.

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

Purpose4/5

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

The opening lines describe the return shape (one group per video, one row per part, part number via page) and the trailing gloss '(danmaku count per part)' pins down the resource. The verb is implicit rather than stated up front, and it does not explicitly distinguish itself from the sibling get_comments (comments vs. danmaku). Clear enough for selection, but not a crisp verb+resource lead.

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

Usage Guidelines3/5

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

It gives real operating guidance: omit ?p= to get all parts, use refresh for fresh data. However there is no explicit when-to-use/when-not framing and no routing to an alternative sibling (e.g. get_comments for actual comment text). Usage is implied rather than declared.

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