Skip to main content
Glama
telegram-tools

telegram-tools

by craft-agent

Send a message

telegram_message_send

Sends a plain-text Telegram message to a chat by ID, with optional forum topic or reply target. Use it to deliver exact text up to 4096 characters without Markdown or HTML parsing.

Instructions

Sends one text to a chat by id: a person, a group, a forum topic or Saved Messages (the user's own chat), optionally as a reply. chat is a chat id from telegram_chat_read, never a name, username or phone number. text goes out exactly as written, never read as Markdown or HTML, surrounding blank space trimmed, at most 4096 characters; a longer text is several calls. topic names a forum topic (an id from telegram_chat_read topics); reply_to replies to a message of that chat by its id. Needs the sync service running. Sending files is a separate tool. A result means Telegram accepted the message, not that anyone has read it. duplicate means an earlier delivery of this same call had already gone out: it was sent once, and it must not be sent again. A failure uncertain means the message may have gone out: check the chat in Telegram (the error lists the matching messages of the user's that the mirror saw) and never send it again without the user checking.

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>",
      "text": "<text>"
    },
    "name": "telegram_message_send"
  }
}

Input Schema

NameRequiredDescriptionDefault
chatYesThe chat id, from `telegram_chat_read`, such as 123456789 or -1001234567890. Saved Messages is the user's own chat (`kind` `self`). A name, username or phone number is not a chat.
textYesThe text exactly as it should arrive; it is never read as Markdown or HTML. Surrounding blank space is trimmed, and what is left is 1 to 4096 characters.
topicNoThe forum topic to send to, an id from `telegram_chat_read` `topics`; the General topic is 1. Only for a chat with topics.
accountNoThe account label; may be left out when only one account is logged in.
reply_toNoThe id of a message of that chat to reply to, as `telegram_chat_read` gives it.

Output Schema

NameRequiredDescriptionDefault
idNoThe sent message's id in that chat; absent when Telegram had already received it and it is not known.
chatYesThe chat the message was sent to.
noteYesWhat the result means.
timeNoWhen Telegram dated it, in local time with offset.
duplicateNoSet when Telegram had already received this same call: the message went out once, and no second exists.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.5.0

TDQS

A4.4/5.0
Behavior4/5

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

Beyond the annotations (which only state it is a non-read-only, open-world, non-destructive write), the description discloses that text is sent raw and never parsed as Markdown/HTML, that surrounding whitespace is trimmed and the 4096-character cap forces multiple calls, and that success means acceptance only, not readership. The `duplicate` and `uncertain` outcome semantics are the most valuable added context. Slightly short of 5 only because permission/auth requirements for the sending account 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.

Conciseness4/5

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

Front-loaded with the verb and resource, and every sentence carries operational information rather than filler. The back half is a dense run of clauses about constraints and outcomes that could be split into short bullet-like sentences, but nothing is redundant.

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?

Given a 5-parameter write tool with an output schema, the description covers the missing pieces an agent needs: prerequisite service state, id-source discipline, character limit and splitting behavior, and how to interpret ambiguous results. Nothing an agent needs to call this safely is absent.

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 all five parameters are already documented in the schema and the description largely restates them (chat id vs name, topic as a forum topic id, reply_to as a message id). The one genuinely additive fact is that text over 4096 characters requires several calls, which tells the agent how to handle the parameter operationally; that is not enough to lift it far 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?

"Sends one text to a chat by id: a person, a group, a forum topic or Saved Messages, optionally as a reply" gives a specific verb, resource, and full destination scope in one sentence. It also explicitly separates itself from file sending ("Sending files is a separate tool"), so an agent can distinguish it from neighbours 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?

States the prerequisite ("Needs the sync service running") and routes the agent to `telegram_chat_read` for both chat ids and topic ids, excluding the obvious wrong inputs (name, username, phone number). It also gives explicit when-to-retry rules for `duplicate` and `uncertain`, including the instruction to have the user check before resending.

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