Skip to main content
Glama

Send message

send_message
Destructive

Send text and optional file attachments to a Telegram chat. Supports reply-to (including forum topics and channel discussion groups), parse_mode: classic markdown/html/auto (entities) or rich (Rich Message document; dialect auto-detected).

Instructions

Send text and optional file attachments to a Telegram chat. Supports reply-to (including forum topics and channel discussion groups), parse_mode: classic markdown/html/auto (entities) or rich (Rich Message document; dialect auto-detected). parse_mode=rich cannot be combined with files. File attachments as http(s) URLs, local paths, or data: URIs. When files are provided, the message text becomes a caption. For channel posts with reply_to_id, automatically posts in the linked discussion group. schedule_date (ISO 8601, must be in the future) queues the message instead of delivering it now, so the result carries status='scheduled' plus scheduled and schedule_date. save_as_draft=true saves the text as the chat's draft instead of sending it (empty message clears the draft; user sessions only, bots cannot; text-only, so no files, no parse_mode='rich', no schedule_date). Success: dict with message_id, date, chat, text, status='sent', and sender info (rich messages also set rich=true and rich_format). Error: dict with ok=false and error string. Use send_message to create new messages; use edit_message to modify existing ones. Use send_message_to_phone when targeting a phone number instead of a chat_id. Full documentation: https://github.com/leshchenko1979/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.
chat_idYesTarget chat: numeric id (e.g. -100…), username without @, or 'me' for Saved Messages.
messageYesMessage text. When sending files, used as caption.
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
reply_to_idNoTelegram message id to reply to. For forums, topic root id; for channel posts, post id (may create a comment). Omit for a new top-level message.
save_as_draftNoIf true, save the text as the chat's draft instead of sending it (an empty text clears the existing draft). User sessions only — bot accounts cannot call messages.saveDraft. Cannot be combined with schedule_date, files, or parse_mode='rich'.
schedule_dateNoISO 8601 instant at which Telegram should deliver the message, e.g. '2026-10-20T09:00:00Z' or '2026-10-20T12:00:00+03:00'. Must be in the future. On send: queues the message instead of delivering now. On edit: reschedules an already-queued message.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
okNo
chatNo
codeNo
dateNo
richNo
textNo
errorNo
actionNo
paramsNo
senderNo
statusNo
topic_idNo
edit_dateNo
exceptionNo
operationNo
scheduledNo
error_codeNo
message_idNo
draft_savedNo
reply_to_idNo
rich_formatNo
reply_markupNo
schedule_dateNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed6 schema fields changedv0.46.1
    • addedInput schema / properties / save_as_draft
      Added value: +{
      +  "default": false,
      +  "description": "If true, save the text as the chat's draft instead of sending it (an empty text clears the existing draft). User sessions only — bot accounts cannot call messages.saveDraft. Cannot be combined with schedule_date, files, or parse_mode='rich'.",
      +  "type": "boolean"
      +}
    • addedInput schema / properties / schedule_date
      Added value: +{
      +  "default": null,
      +  "description": "ISO 8601 instant at which Telegram should deliver the message, e.g. '2026-10-20T09:00:00Z' or '2026-10-20T12:00:00+03:00'. Must be in the future. On send: queues the message instead of delivering now. On edit: reschedules an already-queued message.",
      +  "type": "string"
      +}
    • addedOutput schema / properties / draft_saved
      Added value: +{
      +  "type": "boolean"
      +}
    • addedOutput schema / properties / reply_to_id
      Added value: +{
      +  "type": "integer"
      +}
    • addedOutput schema / properties / schedule_date
      Added value: +{
      +  "type": "string"
      +}
    • addedOutput schema / properties / scheduled
      Added value: +{
      +  "type": "boolean"
      +}
  2. Changed4 schema fields changedv0.45.0
    • changedInput schema / properties / parse_mode / description
      Previous value: -"'markdown', 'html', or 'auto' (detect from content). Default is 'auto'."New value: +"'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."
    • changedInput schema / properties / parse_mode / enum
      Previous value: -[
      -  "markdown",
      -  "html",
      -  "auto"
      -]New value: +[
      +  "markdown",
      +  "html",
      +  "auto",
      +  "rich"
      +]
    • addedOutput schema / properties / rich
      Added value: +{
      +  "type": "boolean"
      +}
    • addedOutput schema / properties / rich_format
      Added value: +{
      +  "type": "string"
      +}
  3. Changed3 schema fields changedv0.36.0
    • removedOutput schema / additionalProperties
      Removed value: -true
    • addedOutput schema / description
      Added value: +"Return type for ``send_message`` and ``edit_message``."
    • addedOutput schema / properties
      Added value: +{
      +  "action": {
      +    "type": "string"
      +  },
      +  "chat": {
      +    "additionalProperties": true,
      +    "type": "object"
      +  },
      +  "code": {
      +    "type": "integer"
      +  },
      +  "date": {
      +    "type": "string"
      +  },
      +  "edit_date": {
      +    "type": "string"
      +  },
      +  "error": {
      +    "type": "string"
      +  },
      +  "error_code": {
      +    "type": "string"
      +  },
      +  "exception": {
      +    "additionalProperties": true,
      +    "type": "object"
      +  },
      +  "message_id": {
      +    "type": "integer"
      +  },
      +  "ok": {
      +    "type": "boolean"
      +  },
      +  "operation": {
      +    "type": "string"
      +  },
      +  "params": {
      +    "additionalProperties": true,
      +    "type": "object"
      +  },
      +  "reply_markup": {
      +    "additionalProperties": true,
      +    "type": "object"
      +  },
      +  "sender": {
      +    "additionalProperties": true,
      +    "type": "object"
      +  },
      +  "status": {
      +    "type": "string"
      +  },
      +  "text": {
      +    "type": "string"
      +  },
      +  "topic_id": {
      +    "type": "integer"
      +  }
      +}
  4. Changed1 schema field changedv0.29.0
    • changedInput schema / properties / files / description
      Previous value: -"List of attachment URLs or local paths (one or more strings). Local paths work in stdio mode only."New value: +"List 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."
  5. First observedv0.21.0

TDQS

A4.8/5.0
Behavior5/5

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

Annotations only declare title, openWorldHint, and destructiveHint; the description goes well beyond by disclosing caption-vs-text behavior, auto-posting into linked discussion groups, draft-clearing semantics, session limitations (bots cannot save drafts), and the shape of success/error results. These are non-obvious side effects an agent must know before sending.

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?

Dense and front-loaded: core action first, then mode/attachment rules, then scheduling/draft variants, then result shape and sibling routing. Long, but nearly every sentence carries a distinct constraint; only the result-shape sentence is partly redundant with the output schema.

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?

For a 7-parameter write tool with rich conditional behavior, the description covers constraints, side effects, session prerequisites, and error shape, leaving nothing essential to inference even though the output schema already exists.

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?

Schema coverage is 100%, so the baseline is 3. The description adds cross-parameter constraint knowledge beyond per-field docs – parse_mode='rich' cannot combine with files, save_as_draft excludes schedule_date/files/rich, and text becomes a caption when files are present – which raises it above the baseline.

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+resource ('Send text and optional file attachments to a Telegram chat') and immediately names the sibling boundaries: edit_message for modification and send_message_to_phone for phone-number targeting. An agent can distinguish it from all seven siblings without opening a schema.

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 routing rules: 'Use send_message to create new messages; use edit_message to modify existing ones. Use send_message_to_phone when targeting a phone number instead of a chat_id.' It also states when to use schedule_date vs. save_as_draft and their mutual exclusions.

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