Skip to main content
Glama

Get Content Attachments

confluence_get_attachments
Read-only

List and retrieve metadata for all files attached to a Confluence page or blog post, including IDs, titles, sizes, and download URLs for processing or download operations.

Instructions

List all attachments for a Confluence content item (page or blog post).

Returns metadata about attachments including:

  • Attachment ID, title, and file type

  • File size and download URL

  • Creation/modification dates

  • Version information

Important: Confluence API returns 'application/octet-stream' as the media type for most binary files (PNG, JPG, PDF) instead of specific types like 'image/png'. For filtering by file type, using the 'filename' parameter is more reliable (e.g., filename='*.png' pattern matching if supported, or exact filename).

Useful for:

  • Discovering what files are attached to a page

  • Getting attachment IDs for download operations

  • Checking if a specific file exists

  • Listing images/documents for processing

Args: ctx: The FastMCP context. content_id: The ID of the content. start: Starting index for pagination. limit: Maximum number of results (1-100). filename: Optional exact filename filter. media_type: Optional MIME type filter (note: most binaries return 'application/octet-stream').

Returns: JSON string with list of attachments and metadata.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
content_idYesThe ID of the Confluence content (page or blog post) to list attachments for. Example: '123456789'
startNo(Optional) Starting index for pagination. Use 0 for the first page. To get the next page, add the 'limit' value to 'start'. Default: 0
limitNo(Optional) Maximum number of attachments to return per request (1-100). Use pagination (start/limit) for large attachment lists. Default: 50
filenameNo(Optional) Filter results to only attachments matching this filename. Exact match only. Example: 'report.pdf'
media_typeNo(Optional) Filter by MIME type. **Note**: Confluence API returns 'application/octet-stream' for most binary files (PNG, JPG, PDF) instead of specific MIME types like 'image/png'. For more reliable filtering, use the 'filename' parameter. Examples: 'application/octet-stream' (binary files), 'application/pdf', 'application/vnd.openxmlformats-officedocument.wordprocessingml.document' (for .docx)

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes
Behavior4/5

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

Annotations provide readOnlyHint=true, indicating this is a safe read operation. The description adds valuable behavioral context beyond annotations: it explains that Confluence API returns 'application/octet-stream' for most binary files instead of specific MIME types, warns about unreliable media_type filtering, and suggests using filename parameter for better filtering. It also describes the return format (metadata list) and mentions pagination behavior. No contradiction with annotations exists.

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 and appropriately sized. It starts with a clear purpose statement, then provides important behavioral notes, usage scenarios, parameter explanations, and return information. Every sentence adds value: the media_type warning is crucial, the usage examples are helpful, and the parameter explanations complement the schema without redundancy.

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 that this is a read-only operation (annotations confirm), has 100% schema description coverage, and includes an output schema, the description provides excellent contextual completeness. It covers purpose, usage scenarios, important behavioral notes about the API's media_type handling, parameter guidance, and return format. No significant gaps exist for this type of listing tool.

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

Parameters3/5

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

Schema description coverage is 100%, so the schema already documents all parameters thoroughly. The description adds some value by explaining the media_type parameter's limitation with Confluence API and suggesting filename as a more reliable alternative, but doesn't provide significant additional semantic context beyond what's in the schema. This meets the baseline expectation when schema coverage is high.

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 tool's purpose: 'List all attachments for a Confluence content item (page or blog post).' It specifies the verb ('List'), resource ('attachments'), and scope ('for a Confluence content item'), distinguishing it from siblings like 'confluence_download_attachment' or 'confluence_upload_attachment' which perform different operations on attachments.

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

Usage Guidelines5/5

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

The description provides explicit guidance on when to use this tool: 'Useful for: - Discovering what files are attached to a page - Getting attachment IDs for download operations - Checking if a specific file exists - Listing images/documents for processing.' It also mentions an alternative approach for filtering by file type (using filename parameter instead of media_type), though it doesn't explicitly name sibling tools as alternatives.

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