Skip to main content
Glama
alexeyleshchenko

Telegram MCP Server

Send message to phone

send_message_to_phone
Destructive

Send a message or files to any Telegram phone number, creating a temporary contact if needed. Supports markdown or HTML formatting, optional reply-to, and cleanup after sending.

Instructions

Send to a phone number: may create a temporary contact, then send text or files. Supports parse_mode: classic markdown/html/auto or rich (Rich Message; dialect auto-detected). parse_mode=rich cannot be combined with files. Success: send result plus contact_was_new / contact_removed when applicable. Full documentation: https://github.com/alexeyleshchenko/fast-mcp-telegram/blob/main/docs/Tools-Reference.md

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
filesNoList of attachment URLs, local paths, or data URIs (one or more strings). data: URIs (data:<mime>;base64,<payload>) work in all server modes; local paths work in stdio mode only.
messageYesMessage text. When sending files, used as caption.
last_nameNoLast name when creating a temporary contact.Name
first_nameNoFirst name when creating a temporary contact.Contact
parse_modeNo'markdown'/'html'/'auto': classic entity formatting (auto detects). 'rich': Telegram Rich Message document; dialect auto-detected (known HTML tags outside code → rich HTML, else rich markdown). Default is 'auto'. parse_mode='rich' cannot be combined with files.auto
phone_numberYesE.164 phone number with country code, e.g. +1234567890 (must be on Telegram).
remove_if_newNoIf true, delete the contact after send when it was created only for this send.
reply_to_msg_idNoReply to this message id in the target chat after resolve.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
okNo
chatNo
codeNo
dateNo
richNo
textNo
errorNo
actionNo
paramsNo
senderNo
statusNo
topic_idNo
edit_dateNo
exceptionNo
operationNo
error_codeNo
message_idNo
rich_formatNo
phone_numberNo
reply_markupNo
contact_removedNo
contact_was_newNo
Behavior4/5

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

The description discloses that sending may create a temporary contact and reports contact_was_new/contact_removed flags in success results, which aligns with the destructiveHint annotation. It also adds a constraint that parse_mode=rich cannot be combined with files, providing context beyond the schema and annotations. 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.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is three sentences, front-loaded with the core purpose, followed by the parse_mode constraint, and rounded out with success result details and a documentation link. Every sentence earns its place, with no filler or repetition of schema fields.

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 the essential behavioral aspects: temporary contact creation, text/files sending, parse_mode limitation, and return flags. Since an output schema exists and all parameters are fully described in the schema, the description provides sufficient context for an agent to invoke the tool correctly. It could have explicitly mentioned all 8 parameters, but those are already in the schema, so this is adequate.

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 description coverage is 100%, so the schema already documents all parameters with clear descriptions. The tool description adds some high-level context about parse_mode behavior (classic markdown/html/auto or rich) but largely repeats what the schema already states. It does not add meaningful detail about first_name, last_name, reply_to_msg_id, or remove_if_new beyond schema.

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 opens with 'Send to a phone number,' which clearly states the action (send) and resource (phone number). It further specifies behavior: may create a temporary contact, then send text or files. This distinguishes it from the sibling tool send_message (which targets a chat), making the purpose unambiguous.

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?

The first sentence establishes when to use this tool: when the target is a phone number rather than a chat ID, and the temporary contact mechanism implies no pre-existing chat is needed. However, it does not explicitly name alternative tools like send_message or state conditions where this tool should not be used, so guidance is clear but not fully explicit.

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/alexeyleshchenko/fast-mcp-telegram'

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