Upload attachment
jira_upload_attachmentAttach a file to a Jira issue using only a filename from the server's media directory, with path traversal and size checks enforced.
Instructions
Attaches a file from this server's media directory to an issue. name is a plain file name inside JIRA_MEDIA_DIR — paths, ".." and subdirectories are refused, so nothing else on the host can be uploaded. Requires JIRA_MEDIA_DIR and a file no larger than 50 MiB. A timeout is reported as ambiguous_write and is never retried automatically: re-read jira_list_attachments before sending the file again, or the issue ends up with two copies.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| name | Yes | File NAME inside the media directory JIRA_MEDIA_DIR names — never a path. "notes.pdf" is valid; "/etc/passwd", "../secret" and "sub/dir/file" are refused. The file must already be there; this server cannot read anything else on the host. | |
| apply | No | Set true to EXECUTE this write. Omit (or false) to get a plan of the request that would be sent. Executing also requires the server to run with JIRA_WRITE_MODE=apply. | |
| issue | Yes | Issue key or numeric id, e.g. ABC-1. Both forms work. | |
| plan_id | No | The single-use id returned by the preceding plan-mode call. Required together with apply: true; a mismatch means the arguments changed since the plan, and the write is refused rather than executed. | |
| profile | No | Named credential profile for this call. Omit to use the active profile. Rejected when the server locks the profile (JIRA_LOCK_PROFILE). | |
| contentType | No | Mime type recorded on the attachment. Defaults to application/octet-stream. |