Send a text message
send_messageSend plain-text Telegram messages only to allow-listed chats; optionally target a forum topic or reply, with quota and confirmation safeguards.
Instructions
Send a plain-text message to a single in-scope chat. The chat must be inside this endpoint’s allow-list; out-of-scope targets are rejected. For a forum supergroup, set topicId (from list_topics) to post into that topic. Subject to the per-endpoint anti-ban quota and, when enabled, human confirmation. An optional idempotency key gives BEST-EFFORT retry de-dup (in-memory, per-process; reset on restart/policy change and NOT covering a send Telegram accepted but reported as failed) — do not assume a retry is safe.
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": {
"peer": "<peer>",
"text": "<text>"
},
"name": "send_message"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| peer | Yes | Chat reference: { kind:'id', value:'<decimal id>' } | { kind:'username', value:'@name' } | { kind:'me' }. | |
| text | Yes | Message body, 1..4096 characters. | |
| topicId | No | Post into this forum topic of a forum supergroup (see list_topics). | |
| idempotencyKey | No | Optional caller-supplied idempotency key (url-safe). Reusing it on a retry gives BEST-EFFORT, in-memory de-dup only (not guaranteed across restarts, policy changes, or a send Telegram accepted but reported as failed). | |
| replyToMessageId | No | Optional id of a message to reply to (same chat). |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| chat_id | Yes | Chat the message was sent to. | |
| sent_at | Yes | Server-acknowledged send instant. | |
| message_id | Yes | Id of the newly created message. | |
| idempotency_key | Yes | The random_id used for idempotent dedup; echoed for traceability. |