Skip to main content
Glama
thenavidm

telegram-mcp-cli

by thenavidm

Download media from a message

download_media
Read-onlyIdempotent

Saves a Telegram message's photo, video, document, or voice note to disk and returns the local path, avoiding huge inline base64 tool results.

Instructions

Save the photo, video, document or voice note attached to a message, and return the local path. The file is written to disk rather than returned inline, because a base64 image in a tool result is enormous and unreadable.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
dirNoDirectory to save into. Defaults to the working directory.
peerYesThe chat the message is in.
message_idYesId of the message carrying the media.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changedv0.5.0
    • removedInput schema / $schema
      Removed value: -"http://json-schema.org/draft-07/schema#"
    • removedInput schema / additionalProperties
      Removed value: -false
  2. First observedv0.4.0

TDQS

A3.8/5.0
Behavior4/5

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

Annotations already declare the safe, idempotent read profile, and the description adds the non-obvious side effect that a file is written to disk and a path returned rather than bytes inline, plus the reason. It does not cover overwrite/filename behavior or the failure case when a message carries no media.

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?

Two sentences with no padding: the action and return value come first, then a single-sentence justification of the disk-write design choice. Every clause earns its place.

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?

With no output schema, the description correctly tells the agent the return value is a local path, and annotations carry the safety profile. Minor gaps remain around naming/overwrite rules and behavior when no media is attached.

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 peer, message_id and dir are already documented, including the working-directory default. The description adds only the return-path behavior, which is not a parameter concern, so baseline 3 applies.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

States a specific verb and resource with scope: save the photo/video/document/voice note attached to a message and return the local path. This clearly separates it from send_file and the other message-mutation siblings, though it never names an alternative outright.

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 context is implied by 'attached to a message', and the disk-vs-inline rationale hints at why an agent should prefer this over inlining media. There is no explicit when-not guidance or named alternative, so it stays at implied-usage level.

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