Skip to main content
Glama

channel_unread

Query per-channel unread counts for a reader in a project, showing who mentioned them, message counts, and latest excerpts without clearing unread status.

Instructions

某读者在某项目下的逐频道未读计数(谁在叫你、有几条、最新一条讲什么)。

纯读:查询不会清掉未读,也不会在库里留下水位行。要清零调 channel_read_ack。

未读 = mentions 整值命中 reader,且消息归属该项目,且晚于该频道的已读水位。 没有水位时按"全部未读"算。

返回 total 与逐频道的 count / latest_sender / latest_excerpt / latest_at。 truncated=true 表示命中扫描上限、计数偏少,不是"就这么多"。

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
readerYes读者角色标识,如 "leader-cc" / "leader-codex"。**不要传 session_id**: 会话是一次性的,按会话记水位会让每开一个新会话就把历史消息重算成未读。
project_idNo归属项目;留空按当前工作目录自动归属。

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv1.12.3

TDQS

A4.6/5.0
Behavior5/5

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

With no annotations provided, the description carries the full behavioral burden and does so: it discloses that the operation is non-mutating (no watermark rows written), defines unread precisely (mentions matching reader, message belongs to project, newer than the channel's read watermark), defines the no-watermark case as 'everything unread', and warns that truncated=true means the scan hit a cap and the counts are undercounted rather than complete.

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?

Front-loaded with the core purpose, then read-only semantics and the ack alternative, then the unread definition and truncation caveat. Dense but every clause carries information; the only minor waste is enumerating return fields that the output schema already covers.

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

Completeness5/5

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

Complete for a read-only aggregation tool: purpose, read-vs-ack semantics, the unread definition and edge case, and truncation behavior are all present. An output schema exists, so restating the return fields is slight redundancy rather than a gap.

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 both reader and project_id are already documented in the schema (including the session_id warning and the empty-string default behavior). The description adds the reader-centric unread definition but nothing further about parameter syntax or formatting, so the baseline of 3 applies.

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?

States a specific verb+resource: per-channel unread counts for a given reader within a project, with a parenthetical telling the agent exactly what each entry answers (who is calling, how many, latest excerpt). This is plainly distinguishable from siblings like channel_read_ack (clearing) and channel_read (reading a channel).

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

Usage Guidelines5/5

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

Explicitly frames this as a pure read that neither clears unread nor writes a watermark row, and names the correct alternative for resetting: channel_read_ack. The when-to-use (checking who mentioned you) and the when-to-use-something-else case are both stated.

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

Deploy Server

Other Tools