Skip to main content
Glama
tharindumendis

agent-telegram-mcp

telegram_download_file

Read-onlyIdempotent

Download a Telegram file by its file_id. Save to disk or get base64-encoded content with filename and size.

Instructions

Download a file from Telegram using its file_id.

If save_path is provided, writes the file to disk and returns the path. Otherwise returns the file content as base64-encoded string.

Use telegram_get_file_info first if you only need the download URL.

Args: params (DownloadFileInput): file_id, optional save_path.

Returns: str: JSON with saved_path or base64 content + filename and size.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
paramsYes

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes
Behavior5/5

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

Beyond annotations (readOnlyHint, destructiveHint, idempotentHint), the description discloses key behaviors: writing to disk vs returning base64, and the return JSON structure with saved_path or base64 content plus filename and size. No contradiction with 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-organized: clear first sentence, then usage note, then args and returns. However, it is somewhat verbose (e.g., repeating 'Args: params...' which is redundant given the schema). Minor improvements could make it more concise.

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 simple 2-parameter tool with annotations covering safety, the description provides enough behavioral and return information. It omits error handling or size limits, but given the presence of an output schema (context indicates yes) and the clarity of the description, it is largely complete.

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

Parameters4/5

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

The input schema already provides detailed descriptions for both parameters, but the description adds context by linking the save_path parameter to the behavioral change (write vs base64) and explicitly stating the return format. This adds value beyond the schema, though the schema itself is already good.

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 states the tool’s action: 'Download a file from Telegram using its file_id.' It distinguishes from sibling tool telegram_get_file_info, which only provides the download URL, making the purpose precise and specific.

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?

Explicit guidance is given: 'Use telegram_get_file_info first if you only need the download URL.' This tells agents when not to use this tool. Additionally, it describes the two modes depending on whether save_path is provided, covering when to use each behavior.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/tharindumendis/Agent_telegeam_mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server