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 with optional JMESPath filtering.

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
jmespathNoOptional JMESPath expression filtering the JSON result before return.
local_pathNoLocal path to save the file (optional, defaults to current directory)
project_idYesProject ID or URL-encoded path of the project

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changedv2.1.66
    • addedInput schema / properties / jmespath
      Added value: +{
      +  "description": "Optional JMESPath expression filtering the JSON result before return.",
      +  "type": "string"
      +}
  2. Addedv2.1.18
  3. Removedv2.1.14
  4. Addedv2.1.11
  5. Removedv2.1.10
  6. Changed1 schema field changedv2.1.9
    • removedInput schema / additionalProperties
      Removed value: -false
  7. First observedv1.0.0

TDQS

A4.4/5.0
Behavior5/5

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

It discloses behavior beyond the readOnlyHint annotation: read-only with respect to GitLab, remote mode returning base64 for images or a download URL, local mode saving to a path, and possible attachment/permission errors. This gives the agent a clear model of side effects and output. No contradiction with annotations.

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?

Two tightly written sentences front-load the core purpose and key mode hint, then add behavioral and error context. No redundant filler; every clause contributes useful information.

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?

For a 5-parameter tool with no output schema, the description covers return format, modes, save behavior, read-only guarantee, and error cases. The main minor gap is that the mapping from 'remote mode' vs 'local mode' to specific parameters is implicit rather than explicit, though local_path makes this reasonably clear.

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 explains all parameters. The description adds value by clarifying local_path's role and the mode-based behavior, but it does not add meaningful detail about secret, filename, project_id, or jmespath beyond what the schema provides.

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 uses a specific verb and resource: 'Download an uploaded file from a project' and 'retrieve a previously uploaded project attachment'. It clearly identifies the tool's function and differentiates it from file/content-related siblings like get_file_contents or push_files.

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 explicitly states when to use it ('Use this to retrieve a previously uploaded project attachment'), describes the two modes, and notes the access prerequisite ('requires project access'). It does not name exclusions or alternatives, but there is no obvious sibling for attachment retrieval, so the guidance is sufficient.

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

Deploy Server

Other Tools