upload_media_file
Upload a file from the configured sandbox directory to the Listmonk media library and get its ID and public URL for use in campaign bodies.
Instructions
Upload a file from LISTMONK_MCP_FILES_DIR to the Listmonk media library and return its ID and public URL for use in campaign bodies. Fails if LISTMONK_MCP_FILES_DIR is not set or the path is outside it. Image types (jpg, png, gif, webp, svg) get the right MIME type; other types upload as generic binary and Listmonk may reject them.
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": {
"file_path": "<file_path>"
},
"name": "upload_media_file"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| title | No | Display title in the media library; defaults to the filename | |
| file_path | Yes | Path to the media file inside LISTMONK_MCP_FILES_DIR (absolute or relative to it) |