upload_file_to_chat
Upload a file to a chat by providing either a local file path or base64-encoded content. Optionally reply to a specific message.
Instructions
Upload a file to a chat.
Args: chat_id: ID of the chat to upload file to file_path: Absolute path to the file on local filesystem (mutually exclusive with file_content) file_content: Base64-encoded file content (mutually exclusive with file_path) filename: Filename to use when file_content is provided (required if file_content is set) reply_to_message_id: Post number to reply to (optional)
Returns: ToolResponse with UploadFilePayload containing uploaded file details including file ID, name, size, and URL
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_id": "<chat_id>"
},
"name": "upload_file_to_chat"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| chat_id | Yes | ||
| filename | No | ||
| file_path | No | ||
| file_content | No | ||
| reply_to_message_id | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| error | No | Error message if operation failed | |
| message | Yes | Human-readable summary of the result | |
| payload | No | The actual response data | |
| success | Yes | Whether the operation was successful |