Bale Bot
v0.3.2Private, local Bale bot for agents: read, search and answer messages, ask and wait, files.
These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.
bot_get_me Bot: who am I
Check BALE_BOT_TOKEN and show the bot's id, username and name.
bot_get_chat Bot: chat info
Get a chat's type, title or name, username and description.
| Parameter | Type | Description |
|---|---|---|
chat_id * | Chat id (number) or public '@channel' username. |
bot_get_webhook_info Bot: webhook status
Show whether a webhook is set (url empty = the reading tools work), pending updates and the last error.
bot_send_message Bot: send message
Send a real text message from the bot. Confirm recipient and text with the user first. Markdown text. The user must have sent /start first. Then bot_wait_for_reply with the returned message_id.
| Parameter | Type | Description |
|---|---|---|
chat_id * | Chat id (number) or public '@channel' username. | |
text * | string | Message text. |
buttons | Inline buttons as rows of labels, e.g. [['Yes', 'No']]. A press arrives as kind 'button'. | |
reply_to_message_id | Message id to reply to. |
bot_send_file Bot: send file
Send a real photo, document, video, audio or voice file from the bot. Confirm recipient and file with the user first.
| Parameter | Type | Description |
|---|---|---|
chat_id * | Chat id (number) or public '@channel' username. | |
kind * | string | File type. |
source * | string | http(s) URL, or local path inside BALE_MCP_SEND_DIRS (max 50 MB). |
caption | Caption. |
bot_edit_message Bot: edit message
Replace the text of a message the bot sent earlier. Changes a real message; confirm with the user first.
| Parameter | Type | Description |
|---|---|---|
chat_id * | Chat id (number) or public '@channel' username. | |
message_id * | integer | Id of a bot text message. |
text * | string | New text. |
bot_delete_message Bot: delete message
Delete a message the bot may delete (its own, or as admin). Irreversible; confirm with the user first.
| Parameter | Type | Description |
|---|---|---|
chat_id * | Chat id (number) or public '@channel' username. | |
message_id * | integer | Message id to delete. |
bot_get_new_messages Bot: new messages
Get messages people sent the bot since the last check, from all chats, oldest first, and mark them read. Messages carry chat_id, kind, text and file_id for media. Fails while a webhook is set.
| Parameter | Type | Description |
|---|---|---|
limit | integer | Max messages. |
bot_list_chats Bot: list chats
List the chats this bot has talked in, newest first, with unread count and last message.
| Parameter | Type | Description |
|---|---|---|
limit | integer | Max chats. |
bot_read_chat Bot: read chat
Show a chat's recent messages in both directions, oldest first, and mark the chat read (local store; Bale keeps no history).
| Parameter | Type | Description |
|---|---|---|
chat_id * | integer | Numeric chat id. |
limit | integer | Max messages. |
bot_search_messages Bot: search messages
Search stored messages by text, newest first. Persian/Arabic yeh, kaf, digits and ZWNJ match each other. Long texts are cut; bot_read_chat shows them whole.
| Parameter | Type | Description |
|---|---|---|
query * | string | Text to find. |
chat_id | Only this chat. | |
limit | integer | Max messages. |
max_chars | integer | Cut each text to this length. |
bot_wait_for_reply Bot: wait for reply
Wait until someone writes in a chat or presses a button, then return the new messages (marked read). Use after bot_send_message. Returns timed_out=true if nobody answered.
| Parameter | Type | Description |
|---|---|---|
chat_id * | integer | Numeric chat id. |
after_message_id | Only messages newer than this id (the message_id you sent). | |
timeout_seconds | integer | Seconds to wait. |
bot_download_file Bot: download file
Download a file someone sent the bot (max 20 MB) and return its local path. Never overwrites (-1, -2, ... suffix).
| Parameter | Type | Description |
|---|---|---|
file_id * | string | file_id from a received message. |
folder | Save folder (default ~/.bale-mcp/files). |