Skip to main content
Glama

Upload Attachment

confluence_upload_attachment
Destructive

Upload files to Confluence pages or blog posts as attachments, supporting new versions and optional comments. Provide file path or base64 content.

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

Args: ctx: The FastMCP context. content_id: The ID of the content to attach to. file_path: Path to the file to upload (server-readable). content_base64: Base64-encoded file content (filesystem-free upload). filename: Attachment filename, required with content_base64. comment: Optional comment for the attachment. minor_edit: Whether this is a minor edit (no notifications).

Returns: JSON string with upload confirmation and attachment metadata.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
commentNo(Optional) A comment describing this attachment or version. Visible in the attachment history. Example: 'Updated Q4 2024 figures'
filenameNo(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_pathNoFull 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_idYesThe 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_editNo(Optional) Whether this is a minor edit. If true, watchers are not notified. Default is false.
content_base64No(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

TableJSON Schema
NameRequiredDescriptionDefault
resultYes
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

The annotations provide destructiveHint: true, and the description adds that existing attachments are updated (new version). It also mentions minor_edit for notification control. This is consistent and provides useful behavioral context beyond the annotation.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is well-structured: it opens with the purpose, then explains the two input modes, then lists use cases, and finally provides a clear args section. Every sentence is informative without redundancy.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the 6 parameters and output schema, the description covers the essential aspects: input methods, optional parameters, versioning behavior, and return type. It could mention authentication requirements or error handling, but the description is sufficiently complete for an agent to use the tool.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100%, so baseline is 3. The description adds value by succinctly summarizing the two parameter groups (file_path vs content_base64+filename) and their mutual exclusivity, which is not explicitly stated in the schema descriptions.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the action ('upload an attachment') and the resource ('Confluence content (page or blog post)'). It distinguishes itself from sibling tools like confluence_download_attachment and confluence_delete_attachment by focusing on the upload/update functionality.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description explains when to use file_path vs content_base64, and that only one must be supplied. It also describes the behavior when an attachment already exists (new version created). However, it does not explicitly compare to the sibling confluence_upload_attachments (plural) or mention prerequisites like authentication.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/GeiserX/atlassian-browser-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server