Skip to main content
Glama

download_attachment

Read-only

Retrieve a previously uploaded file from a GitLab project. Returns inline base64 for images or saves to a local path, enabling access to project attachments without direct GitLab UI access.

Instructions

Download an uploaded file from a project (images returned as base64; use local_path to save to disk). Use this to retrieve a previously uploaded project attachment; remote mode returns inline base64 for images or a download URL, while local mode can save to a path. It is read-only with respect to GitLab, requires project access, and returns the file content or an attachment/permission error.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
secretYesThe 32-character secret of the upload
filenameYesThe filename of the upload
local_pathNoLocal path to save the file (optional, defaults to current directory)
project_idYesProject ID or URL-encoded path of the project
Install Server

TDQS

A4.1/5.0
Behavior4/5

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

Annotations already declare readOnlyHint=true and openWorldHint=true, so the description doesn't need to restate read-only. It adds valuable behavior: images returned as base64 in remote mode, local_path saves to disk, requires project access, and returns content or an attachment/permission error. It does not contradict annotations. Slight gap: no detail on what happens if filename is not found, but the error mention covers it partially.

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

Conciseness4/5

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

The description is compact at a few sentences, front-loads the core purpose and the key base64 detail, and avoids redundancy. The mode explanation is useful but slightly repetitive; still, every sentence adds value.

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 tool's complexity (download with modes and error handling) and that there is no output schema, the description covers the key aspects: what it does, the modes, the read-only nature, and required access. It doesn't detail the exact response structure beyond base64/URL, but that's acceptable for a download tool with a simple return. The openWorldHint annotation implies permissions might vary, and the description mentions 'requires project access' to complement it.

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 four parameters including local_path's optional behavior. The description adds meaning by explaining the mode distinction (remote vs local) that ties into project_id and filename, but doesn't add syntax or format details beyond the schema. Baseline 3 is appropriate.

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 downloads an uploaded file from a project, and distinguishes it from related operations like upload_markdown or get_file_contents. It specifies the read-only nature and the different behaviors in remote vs local mode, making it distinct from siblings in the project/file domain.

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 it: 'to retrieve a previously uploaded project attachment.' It also contrasts remote mode (returns inline base64 or download URL) with local mode (saves to path), providing practical context. However, it does not explicitly mention when NOT to use it or name alternative tools like get_file_contents for repository files, though the focus on 'uploaded attachments' implies that distinction.

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

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/zereight/gitlab-mcp'

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