upload_file
Upload a local file to a Mattermost channel and get its file ID for attaching to messages.
Instructions
Upload a file to a channel.
The file will be attached to messages in the specified channel. Returns file ID that can be used when posting messages with file_ids parameter.
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": {
"channel_id": "<channel_id>",
"file_path": "<file_path>"
},
"name": "upload_file"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| filename | No | Override filename | |
| file_path | Yes | Local path to the file to upload; a leading '~' is expanded | |
| channel_id | Yes | 26-character channel identifier (e.g., 'o5w8h47pdfbzjc4d8w7dhnhren') |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| client_ids | No | Client-provided IDs | |
| file_infos | Yes | Uploaded file information |