Skip to main content
Glama

Upload Attachment

confluence_upload_attachment
Destructive

Upload 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

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 description discloses the key behavioral trait of versioning: 'If the attachment already exists (same filename), a new version is created.' This goes beyond the destructiveHint annotation by explaining the specific mutation behavior. It also clarifies the base64 mode is for remote/containerized servers. No contradiction with annotations found.

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 with a clear opening sentence, a concise paragraph on input modes, and a bulleted list of use cases. No redundant or filler content; every sentence contributes meaningful information.

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

Completeness5/5

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

Given the rich schema and output schema, the description does not need to explain return values. It adequately covers the tool's purpose, input exclusivity, versioning behavior, and use cases. It is complete enough for an agent to understand when and how to invoke this tool successfully.

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?

The schema already covers all parameters (100% coverage), providing detailed descriptions for each. The tool description adds value by stating the mutual exclusivity constraint ('Exactly one of the two must be supplied') and explaining the rationale for the base64 mode. This enhances understanding beyond the schema alone.

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

Purpose4/5

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

The description clearly states the verb and resource: 'Upload an attachment to Confluence content (page or blog post).' It is specific about the target and the two input modes. However, it does not distinguish from the sibling tool 'confluence_upload_attachments' (plural), leaving ambiguity about whether this tool is for single vs. batch uploads.

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 provides clear context for when to use the tool, listing concrete use cases ('Attaching documents, images, or files to a page', 'Updating existing attachments with new versions', 'Adding supporting materials to documentation'). It also explains when to use file_path vs. content_base64 based on server environment. However, it does not explicitly mention alternatives or exclusions, such as using the plural upload tool for multiple files or listing attachments with get_attachments.

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/hieptran87/atlassian-mcp-server'

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