Skip to main content
Glama
draiqw
by draiqw

tg_pending

Read-onlyIdempotent

Find Telegram chats with unanswered messages: who waits for you and who owes you a reply. Filter by direction, age, type, or archive to surface stale threads needing attention.

Instructions

Conversations left hanging: who waits on a reply from you, and who owes you one. Unlike tg_unread this survives the chat being opened — a message read and then forgotten is no longer unread, but it is still unanswered. Oldest first.

Broadcast channels are excluded unless kind="channel" (their last message is incoming by definition), and so is Saved Messages — a note to yourself is not a debt.

Args: limit: how many chats to return. direction: "theirs" (default) — last message incoming, never replied to: the ball is in your court; "mine" — yours, nobody answered; "both" — one list, each row tagged. min_age_hours: skip anything newer. 24 or 48 shows only what went stale. kind: one type only — "user", "bot", "group", "channel". Asking for a type overrides the exclusions above. archived: null (default) covers both lists, false the main one, true the archive. include_bots: bots are out by default (their last message is nearly always an unanswered notification).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
kindNo
limitNo
archivedNo
directionNotheirs
include_botsNo
min_age_hoursNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A5/5.0
Behavior5/5

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

Annotations already mark this as read-only, idempotent, and non-destructive. The description adds meaningful behavioral context beyond those flags: ordering is oldest first, messages read but not answered are still counted, bots are excluded by default, and the archived parameter has a tri-state behavior. No contradictions with the annotations exist.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is front-loaded with the core concept, immediately distinguishes the tool from tg_unread, and then organizes parameter explanations clearly under an 'Args' section. Every sentence adds information, and the length is justified by the number of nuanced parameters.

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 complexity of the six parameters and the absence of an output schema, the description is complete for tool selection and invocation. It explains defaults, exclusions, ordering, direction semantics, and the effect of each argument, leaving no critical gap for an agent to call tg_pending correctly.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters5/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

With 0% schema description coverage, the description carries the full burden of explaining all six parameters, and it does so thoroughly. Each parameter gets a plain-language explanation, default behavior, allowed values for direction and kind, and the semantic meaning of archived as a tri-state. This goes far beyond what the raw schema provides.

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 clearly defines the tool's purpose: listing chats with messages awaiting a reply, with a specific distinction between 'waiting on you' and 'owed to you'. It explicitly differentiates itself from tg_unread by noting that opened-but-forgotten chats remain pending, so an agent can tell exactly what tg_pending returns.

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?

The description provides explicit usage guidance by contrasting with tg_unread ('this survives the chat being opened') and by detailing exclusions for broadcast channels and Saved Messages. It also explains how the kind parameter overrides these default exclusions, giving clear conditions for when to use this tool versus alternatives.

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