Skip to main content
Glama

知你AI助手|多平台客户与客服数据 MCP

查询当前会话队列

zhini_list_active_sessions

获取当前授权客服账号所负责渠道下尚未关闭、尚未结束的当前会话队列。用于查看此刻的待接待、我的会话、同事会话、AI 会话状态,或从当前队列选定会话后读取消息/客户资料。重要边界:这是当前队列快照,不是历史查询;当天或更早已经由当前授权账号、其他客服结束/关闭的会话不会返回,不能用本工具汇总某天或某段时间内的全部用户、全部接待或完整会话。需要完整用户范围时调用 zhini_search_customers;需要已结束、已关闭或历史会话时调用 zhini_search_sessions,必要时再用 zhini_fetch_messages 按消息时间验证。范围:只返回当前授权账号负责渠道下的会话,不是全企业所有会话;我的会话全部返回,同事会话最多显示 250 个,排队中/等待接待会话最多显示 100 个,达到上限时摘要应提示可能被截断。前置:需要区分“我的会话/同事会话”时,先调用 zhini_get_current_kefu 获取当前 kfid。

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
kfidNo当前调用者客服 ID。可由 zhini_get_current_kefu 获取;传入后可标记 queue_type:mine、colleague、waiting、ai。未传 kfid 时不能判断 mine/colleague,只能识别 waiting、ai、assigned_unknown。

Schema Changelog

Changes observed during successful MCP inspections. Dates show when Glama detected each change.

  1. First observed

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 burden of behavioral disclosure, and it excels: it discloses the snapshot nature (not historical), the scope restriction (only current account's channels, not whole enterprise), the truncation limits (250 colleague, 100 waiting, with a hint when truncated), and the kfid dependency for queue-type classification. Nothing about the tool's operational behavior is left to inference.

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?

The description is long but every sentence carries operational value—there is no filler. It follows a logical flow: purpose → boundary → alternatives → scope/truncation limits → prerequisite. For a tool with this many caveats, the length is justified, though it could be tightened slightly without losing information.

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?

Given the tool's complexity (snapshot vs. history distinction, truncation limits, prerequisite dependencies, sibling routing) and the absence of annotations and output schema, the description covers everything an agent needs to call it correctly and interpret results. It even discloses the truncation hint behavior. Nothing essential 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 coverage is 100%, so the kfid parameter is already fully documented in the schema (including how to obtain it and its effect on queue_type classification). The description reinforces this in the prerequisite but adds little meaning beyond what the schema already provides. Baseline 3 is appropriate given the high coverage.

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 states a specific verb+resource ('获取...当前会话队列' - queries the current session queue of not-closed sessions under the current account's channels) and immediately distinguishes it from siblings by clarifying this is a live snapshot, not a historical query. The boundaries are explicit, making it unambiguous which tool is which.

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?

Explicit when-to-use (viewing pending/mine/colleague/AI states, selecting a session to read messages) and explicit when-not-to-use with named alternatives: zhini_search_customers for full user scope and zhini_search_sessions for ended/closed/historical sessions. Also states the prerequisite of calling zhini_get_current_kefu when distinguishing mine/colleague sessions. This is textbook-level routing guidance.

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.