Upload Attachment
confluence_upload_attachmentUpload attachments to Confluence pages or blog posts by providing a file path or base64 content, creating a new version if the file already exists.
Instructions
Upload an attachment to Confluence content (page or blog post).
Provide the file either as a server-readable path ('file_path') or as base64-encoded content ('content_base64' together with 'filename'). The base64 form is intended for remote or containerized servers that cannot read host file paths. Exactly one of the two must be supplied.
If the attachment already exists (same filename), a new version is created. This is useful for:
Attaching documents, images, or files to a page
Updating existing attachments with new versions
Adding supporting materials to documentation
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| comment | No | (Optional) A comment describing this attachment or version. Visible in the attachment history. Example: 'Updated Q4 2024 figures' | |
| filename | No | (Optional) Attachment filename, including extension (e.g. 'report.pdf'). Required when using 'content_base64'; it determines the attachment title and file type. Ignored when 'file_path' is used. | |
| file_path | No | Full path to the file to upload. Can be absolute (e.g., '/home/user/document.pdf' or 'C:\Users\name\file.docx') or relative to the current working directory (e.g., './uploads/document.pdf'). If a file with the same name already exists, a new version will be created. Requires the server to be able to read the path; for remote or containerized servers use 'content_base64' instead. Provide either 'file_path' or 'content_base64', not both. | |
| content_id | Yes | The ID of the Confluence content (page or blog post) to attach the file to. Page IDs can be found in the page URL or by using the search/get_page tools. Example: '123456789' | |
| minor_edit | No | (Optional) Whether this is a minor edit. If true, watchers are not notified. Default is false. | |
| content_base64 | No | (Optional) Base64-encoded file content to upload directly, without the server reading from disk. Use this when the server cannot access host file paths (e.g. a remote or containerized MCP server). Requires 'filename'. Provide either 'file_path' or 'content_base64', not both. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |