---
name: tracker/jira-official:attachment-add
description: Add attachment to JIRA issue
version: "0.5.0"
---

# Attachment Add

> **Backend:** jira-official (atlassian@claude-plugins-official)

> **Note:** Requires `atlassian@claude-plugins-official` plugin. Install: `/plugin install atlassian@claude-plugins-official`

> **Plugin Support:** This operation may not be supported by the official Atlassian plugin. If unavailable, use the Atlassian REST API directly or switch to a custom backend with `TRACKER_BACKEND_OVERRIDE: jira-custom`.

Uploads a local file as an attachment on the specified JIRA issue.

## Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| issue_key | string | Yes | JIRA issue key (e.g., `<PROJECT_KEY>-123`) |
| file_path | string | Yes | Absolute path to the file to attach |

## Implementation

Attachment upload is not exposed as a direct tool in the official Atlassian plugin. Use the JIRA REST API directly as a fallback:

```
# Add attachment — JIRA REST API fallback
POST /rest/api/3/issue/<issue_key>/attachments
Headers:
  X-Atlassian-Token: no-check
  Content-Type: multipart/form-data
Body:
  file: <file_path>
```

If the plugin gains a native attachment tool, the expected tool name would follow the pattern `mcp__atlassian__addJiraIssueAttachment`.

## Output

| Field | Type | Description |
|-------|------|-------------|
| id | string | Attachment ID assigned by JIRA |
| filename | string | Name of the uploaded file |
| size | number | File size in bytes |
| created | string | ISO 8601 timestamp of upload |

## Errors

| Code | Cause | Recovery |
|------|-------|----------|
| 404 | Issue key not found | Verify the issue key exists and the project key is correct |
| 403 | Insufficient permissions to add attachments | Confirm the JIRA user has attachment permissions on the project |
| 400 | File path invalid or file not readable | Verify the file exists and the path is absolute |
| 413 | File exceeds JIRA attachment size limit | Reduce file size or split into multiple attachments |
| MCP | Plugin unavailable | Verify the `atlassian@claude-plugins-official` plugin is installed and connected |

## Used By

- dev-task (attaching build artifacts or test reports to task issues)
