Skip to main content
Glama
tg-secretary-mcp

tg-secretary-mcp

by developkiko

secretary_search

Read-only

Search archived Telegram direct messages by text across all private chats or within one chat, ranking exact phrase matches before messages containing all words.

Instructions

Search message text across the archive, or within one chat. Full phrase matches come first, then messages with all the words. The bot only sees private chats that wrote to the owner after it was connected (Settings → Chat Automation), and only while the server was running. Groups, channels and older history are never available.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "query": "<query>"
    },
    "name": "secretary_search"
  }
}

Input Schema

NameRequiredDescriptionDefault
chatNoChat: numeric id, @username, or part of the person's name
limitNoHow many to return, at most 100 (default 20)
queryYesText to look for
sinceNoUnix seconds or ISO 8601 date-time
untilNoUnix seconds or ISO 8601 date-time

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.2.0

TDQS

A4.1/5.0
Behavior5/5

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

Beyond readOnlyHint=true and openWorldHint=false, the description discloses genuinely load-bearing behavior: only private chats that wrote to the owner after connection are indexed, only messages received while the server was running are present, and groups, channels, and older history are never available. It also documents the ranking rule, which no annotation or schema field conveys.

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?

Three compact sentences with the core capability front-loaded and the ordering rule immediately after. Every sentence carries information, though the long final sentence stacks several distinct coverage caveats together in a way that is slightly harder to parse than a short list.

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?

For a read-only search tool with full schema coverage and no output schema, the description covers scope, ranking, and the coverage limits that could otherwise cause an agent to misread empty results as absence of messages. It does not describe the shape of returned results or how they are paginated beyond the limit parameter, a minor remaining 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 coverage is 100%, so chat, query, limit, since, and until are already documented in the schema itself. The description adds only that a chat scope restricts the search to one conversation, without clarifying date-range interaction or result semantics beyond the schema. Baseline 3 applies when the schema does the heavy lifting.

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 and resource — search message text — plus its two scopes (across the archive, or within one chat), which immediately separates it from siblings like secretary_read or secretary_chats. It also discloses result ordering (full phrase matches first, then messages with all the words), so an agent knows what kind of retrieval this is without opening the schema.

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?

Usage is implied rather than stated: the description makes clear this is a text-search tool and that scoping by chat is optional, but it never says when to prefer it over secretary_read or the other retrieval siblings, nor when not to use it. The availability caveats are informative but are about data coverage, not tool selection.

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