add_attachment
Attach a local file or inline content to a YouTrack issue. Supports binary uploads via base64 encoding for reports, images, or data files.
Instructions
Attach a file to a YouTrack issue.
Two input modes:
file_path: upload an existing file from disk (report.html, chart.png, data.xlsx).filenameoverrides the displayed name. SECURITY: this mode reads a local file whose bytes are then uploaded to a remote issue, so it is confined to an allowlist of directories and is DISABLED unless the operator sets YOUTRACK_ATTACHMENT_ROOTS. Prefer thecontentmode below.content+filename: upload generated/inline content with no temp file. Text is UTF-8 encoded; setcontent_base64=Trueto upload binary you already hold as base64 (e.g. a screenshot).
For plain-text or markdown reports, prefer add_comment — it renders
inline, is searchable, and notifies watchers. Reach for this when the
artifact is binary (HTML/Excel/PDF/image) or a downloadable file is
genuinely wanted.
Args:
issue_id: Issue ID or URL.
file_path: Path to a local file to upload (mode A).
content: Inline content to upload (mode B; requires filename).
filename: Display name. Required for content; optional override
for file_path (defaults to the file's basename).
content_base64: Treat content as base64-encoded binary.
mime_type: Override the auto-detected MIME type.
instance: YouTrack instance (optional).
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| content | No | ||
| filename | No | ||
| instance | No | ||
| issue_id | Yes | ||
| file_path | No | ||
| mime_type | No | ||
| content_base64 | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |