download_attachment
Download a Jira attachment to a local file using its attachment ID or the exact URL from list_attachments, with an HTML-page guard unless allowHtml is true.
Instructions
Download the content of an attachment to a local file (GET /rest/tests/1.0/attachment/{id}). Address it by attachmentId or by the exact url list_attachments returns — pass exactly one of the two. Attachment content lives outside API v1: /rest/tests/1.0/attachment/{id} is the url the official list endpoint itself hands out, so this tool follows it without requiring ZEPHYR_ALLOW_INTERNAL_API. A supplied url must be on the configured Jira host — credentials are never sent to another host. A query string on the url is sent as request parameters rather than kept in the path, so it is never echoed in an error message (error messages carry the method and the path only, because a query string can carry a token). outputPath is written on the machine running this MCP server and its parent directory must already exist; a failed download writes nothing. Jira answers a url that is not attachment content (a login redirect, an unknown path) with HTTP 200 and an HTML PAGE, so a response whose body starts with or is refused and nothing is written — { savedTo, bytes } therefore means the bytes really came from the attachment endpoint. The refusal names the page it caught (its , or the page's first readable text when it has none) so a login redirect, an error page and a wrong host can be told apart. Set allowHtml: true for an attachment that genuinely is an HTML file. Markup that is not a page (XML, SVG) is never affected. Returns { savedTo, bytes }.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| url | No | Exact download url as returned by list_attachments; must be on the configured Jira host. Mutually exclusive with attachmentId. | |
| allowHtml | No | Save the response even when it is an HTML page (default false). Only for an attachment that really is an HTML file — it disables the guard against saving a Jira login or error page as attachment content. | |
| outputPath | Yes | Local path to write the file to, on the machine running this MCP server (the parent directory must exist) | |
| attachmentId | No | Numeric attachment id, as returned by list_attachments or by an upload_attachment response; mutually exclusive with url |