Skip to main content
Glama
kotlogramme

kotlogramme

List files in a chat

telegram_list_files
Read-onlyIdempotent

Lists media and files in a Telegram chat, newest first, returning message ids, kind, size and file name for download; supports paging with a cursor.

Instructions

Lists the messages of a chat that carry media or files, newest first, with message id, kind, size and file name. The message id is what telegram_download_media takes. When the page is full the result has 'next_cursor'; pass it back as 'cursor' for more.

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": {
      "chat": "<chat>"
    },
    "name": "telegram_list_files"
  }
}

Input Schema

NameRequiredDescriptionDefault
chatYesThe chat: 'me' for Saved Messages, an @username, or a numeric chat id as listed by telegram_list_chats. Invite links are not accepted.
kindNoWhich files to list.all
limitNoHow many files to return.
cursorNoThe 'next_cursor' of the previous page, to continue after it.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.11.1

TDQS

A4.3/5.0
Behavior4/5

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

Annotations already declare readOnly, idempotent, open-world, non-destructive, so the safety profile is covered. The description adds genuinely useful behavior beyond them: ordering (newest first), the shape of each returned row, and the pagination contract with next_cursor/cursor. Rate limits or result caps beyond the limit parameter are not mentioned.

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?

Three short sentences: purpose first, then the downstream id usage, then pagination. No filler, and the most decision-relevant information is front-loaded.

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?

With no output schema, the description correctly carries the return-value burden by naming the fields per result and the pagination field. For a read-only listing tool with fully documented parameters, nothing essential for correct invocation 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%, with per-parameter descriptions including the chat addressing formats and the kind enum, so the baseline is 3. The description's cursor sentence largely restates what the schema already says, adding only the linkage between returned message ids and the download tool rather than new meaning about inputs.

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 ('Lists the messages of a chat that carry media or files') and immediately narrows scope with 'newest first' plus the returned fields (message id, kind, size, file name). That scope cleanly separates it from a general history reader or message search, so an agent can identify its purpose 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 Guidelines4/5

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

Gives a concrete next-step rule: the returned message id is what telegram_download_media takes, and a full page yields 'next_cursor' to feed back as 'cursor'. It does not say when to prefer this over plain history reading or searching, but the media-only scope makes the applicable situation fairly evident.

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