Skip to main content
Glama
draiqw
by draiqw

tg_activity

Read-onlyIdempotent

Discover active chats in any period, with separate incoming/outgoing counts and optional per-day calendar for one chat. Use it for daily recaps or checking when a chat was active.

Instructions

Which chats had any conversation in a period — "where did I talk today".

Unlike tg_unread this covers chats already read and chats where only the owner wrote, so it is the right start for a daily recap. Counts incoming and outgoing separately, archive included.

With chat the axis turns: not "which chats were active" but "which days this chat was active" — a per-day calendar over the whole history, without downloading it. Days are UTC, newest first, each carrying the message ids at its edges so tg_history can jump into that day.

The calendar is exact with exact=true, and for an attachment kind always. For all messages it comes from sparse server positions: exact up to ~2000 messages, sampled above that, and the reply says so.

Args: since: lower bound. Omitted means "today" (local midnight) for the all-chats view, "the whole history" for the calendar. Takes an ISO datetime or an offset like "-6h", "-30d". until: upper bound, ISO datetime; omit for "up to now". limit_chats: cap on chats returned (all-chats view). kind: all-chats view — one dialog type: "user", "bot", "group", "channel". Calendar — count one attachment type instead of all messages, same tabs as tg_media. include_own: false drops chats where nobody but the owner wrote. per_chat: also include this many messages from each chat as a sample. chat: switch to the per-day calendar of this one chat. limit_days: cap on days the calendar returns, newest first.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
chatNo
kindNo
sinceNo
untilNo
per_chatNo
limit_daysNo
include_ownNo
limit_chatsNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.8/5.0
Behavior5/5

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

Even with readOnlyHint and idempotentHint annotations, the description adds substantial behavioral detail: days are UTC and newest first, archive is included, incoming and outgoing are counted separately, and for all-message calendars it relies on sparse server positions that are exact up to ~2000 messages then sampled, with the reply explicitly saying so. This goes well beyond the annotations.

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 well-structured with a clear lead, a contrast to tg_unread, a mode explanation, an accuracy caveat, and a readable Args list. It is longer than strictly necessary, and the unexplained 'exact=true' reference adds minor noise, but most sentences carry useful information and the front-loaded purpose is strong.

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?

The description covers both usage modes, all parameters, default behaviors, sampling caveats, and UTC ordering, which is impressive for a tool with no output schema. However, the mention of 'exact=true' is not backed by a schema parameter, and 'same tabs as tg_media' relies on the agent understanding an external tool's tabs, leaving slight gaps for a fully self-contained call.

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?

The schema descriptions are completely absent (0% coverage), but the Args section compensates thoroughly by explaining all eight parameters: since/until bounds and defaults, limit_chats, kind, include_own, per_chat, chat, and limit_days. It also gives concrete offset examples like '-6h' and '-30d', which the raw schema does not provide.

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 opening sentence states the tool's core function: 'Which chats had any conversation in a period — where did I talk today' — with a specific resource (chats) and action (find activity). It also explicitly differentiates from tg_unread by noting it covers already-read chats and owner-only conversations, and clearly describes the second calendar mode triggered by the chat parameter.

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 gives explicit when-to-use guidance: 'Unlike tg_unread this covers chats already read and chats where only the owner wrote, so it is the right start for a daily recap.' It also references related tools naturally, such as using tg_history to jump into a specific day and sharing attachment tabs with tg_media, showing the agent both the intended context and alternatives.

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