Upload File Attachment
upload_fileAttach files like logs or screenshots to any MantisBT issue using a local file path or base64 content, without altering issue fields or status.
Instructions
Upload a file as an attachment to a MantisBT issue. Adds the file to the issue without modifying any issue fields or status. Returns the created attachment metadata on success.
Provide exactly one of the two input modes:
file_path (preferred): absolute path to a local file — use this whenever the file exists on disk; the server reads and encodes it automatically; filename is derived from the path
content: Base64-encoded file content — only use this when the file is not accessible via a path (e.g. in-memory data); filename must be supplied explicitly via the filename parameter
The optional content_type sets the MIME type (e.g. "image/png"); defaults to "application/octet-stream". Use the optional description to annotate the attachment.
Use this tool to attach files such as logs, screenshots, or patches to an existing issue. To list existing attachments, use list_issue_files. To retrieve issue details, use get_issue.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| content | No | Fallback: Base64-encoded file content — only use when file_path is not available (mutually exclusive with file_path) | |
| filename | No | File name for the attachment (required when using content; overrides the derived name when using file_path) | |
| issue_id | Yes | Numeric issue ID | |
| file_path | No | Preferred: absolute path to the local file to upload — use this whenever the file exists on disk (mutually exclusive with content) | |
| description | No | Optional description for the attachment | |
| content_type | No | MIME type of the file, e.g. "image/png" (default: "application/octet-stream") |