Jira Attach File
jira_attachUpload a file or text content as an attachment to a specified Jira issue. Supports images, documents, archives, and code files.
Instructions
Upload a file attachment to a Jira issue.
Two ways to attach files:
Local file: Provide
filePathto upload an existing filejira_attach({ issueIdOrKey: "PROJ-123", filePath: "/path/to/screenshot.png" })Text content: Provide
textContentandfileNameto create and upload a text filejira_attach({ issueIdOrKey: "PROJ-123", textContent: "Error log contents here...", fileName: "error.log" })
Supported file types: Images (png, jpg, gif), documents (pdf, doc, xls), text (txt, csv, json, md, log), archives (zip, tar), code files, and more.
Returns: Attachment metadata including ID, filename, size, and URL.
To list existing attachments: Use jira_get with:
path:
/rest/api/3/issue/{issueKey}jq:
fields.attachment[*].{id:id,filename:filename,size:size}
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| fileName | No | Filename to use when uploading textContent (e.g., "notes.txt", "report.md") | |
| filePath | No | Path to the local file to upload. Use this OR textContent/fileName, not both. | |
| textContent | No | Text content to upload as a file. Requires fileName to be specified. | |
| issueIdOrKey | Yes | The Jira issue ID or key to attach the file to (e.g., "PROJ-123" or "10001") |