Skip to main content
Glama

upload_file

Upload a file to a GitLab project and get the Markdown snippet to embed it in issues, MRs, or epics. Supports local file path or base64 data, with a dry-run preview mode.

Instructions

Upload a file to a project so it can be embedded in an issue, MR, or epic description. Returns the Markdown snippet GitLab expects (e.g. alt). Provide exactly one of file_path (read from local disk) or file_base64 (inline data). dry_run=true by default.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
project_idYesProject ID to upload to
filenameYesFilename to register on GitLab (extension matters for image detection)
file_pathNoAbsolute path to a local file to upload
file_base64NoBase64-encoded file content (alternative to file_path)
dry_runNoDry run mode (default: true). When true, returns a preview of the action without executing it. Set to false only after user confirmation.
Behavior4/5

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

The description discloses the tool's write nature (upload) and the dry-run default behavior, which is a safety measure. It also mentions the return value (Markdown snippet). No contradiction with annotations (readOnlyHint=false). Could add more about permissions or potential side effects, but adequate.

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 sentences with no wasted words. The description is front-loaded with the main purpose and immediately provides actionable guidance. Highly concise.

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 tool's simplicity, the description covers the key aspects: purpose, input constraints (mutual exclusivity), return value example, and safety note (dry_run). No output schema is needed as return type is described. Annotations and schema fully cover additional details.

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%, providing baseline 3. The description adds value by clarifying the mutual exclusivity of file_path and file_base64, and the default dry_run=true. This goes beyond the schema's individual 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 tool uploads a file to a project for embedding in issue/MR/epic descriptions, and distinguishes it from sibling tools like create_file by specifying the returned Markdown snippet. The verb 'upload' and resource 'file to a project' are specific.

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 gives clear context for when to use (embedding in descriptions) and provides key instructions: provide exactly one of file_path or file_base64, and dry_run=true by default. It does not explicitly state when not to use, but the context is sufficient.

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

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