Edit message
edit_messageUpdate the text of one of your own messages in a scoped chat by peer and message ID; other or out-of-scope messages are rejected.
Instructions
Edit the text of one of your own messages in a chat within this endpoint scope. Addressed by { peer, messageId }; the new text replaces the old. Out-of-scope peers and messages you did not send are rejected.
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>",
"messageId": "<messageId>",
"text": "<text>"
},
"name": "edit_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. | |
| messageId | Yes | A positive per-chat message id. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| chatId | Yes | Chat containing the edited message. | |
| messageId | Yes | Id of the edited message. | |
| editedDateIso | Yes | Server-acknowledged edit instant. |