Upload File Attachment
upload_fileAttach files such as logs, screenshots, or patches to a MantisBT issue without modifying other fields. Accepts a local file path or base64-encoded content.
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.
Two input modes — exactly one must be provided:
file_path: absolute path to a local file; filename is derived from the path automatically
content: Base64-encoded file content; 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 |
|---|---|---|---|
| issue_id | Yes | Numeric issue ID | |
| file_path | No | Absolute path to the local file to upload (mutually exclusive with content) | |
| content | No | Base64-encoded file content (mutually exclusive with file_path) | |
| filename | No | File name for the attachment (required when using content; overrides the derived name when using file_path) | |
| content_type | No | MIME type of the file, e.g. "image/png" (default: "application/octet-stream") | |
| description | No | Optional description for the attachment |