Skip to main content
Glama

gitlab_get_repository_file

Fetch a file's content from any GitLab project by providing project ID and file path, with optional branch, tag, or SHA to target a specific version. Returns base64-encoded content.

Instructions

File contents (GET /repository/files/:path). content is base64.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
refNoBranch, tag, or SHA. Default: the project's default HEAD.
filePathYes
projectIdYesNumeric ID or path with namespace, e.g. group/project.
Install Server

TDQS

B3.1/5.0
Behavior3/5

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

No annotations are provided, so the description carries the behavioral burden. It discloses that return content is base64-encoded, which is useful, and the GET verb implies a read-only operation. However, it doesn't mention error behavior, authentication, URL encoding of the file path, or limits.

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 extremely concise and front-loaded with the core purpose. The endpoint and base64 detail are delivered in one compact sentence with no filler.

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

Completeness3/5

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

For a simple file-fetch operation, the description covers the essential action and a key response trait. But with no output schema and no annotations, an agent may still lack clarity on the exact response shape, error cases, and path-handling requirements.

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

Parameters2/5

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

Schema descriptions cover ref and projectId, but filePath has no schema description. The description's endpoint hint ':path' adds some context for filePath, but not enough to clarify path formatting, encoding, or whether a leading slash is needed. It adds little value beyond the schema.

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 states the resource (repository file), the operation (GET), and a key detail (base64 content). It clearly identifies the tool as a file-content fetcher. It doesn't explicitly distinguish itself from sibling tools, but the resource and operation are specific enough given the sibling list.

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

Usage Guidelines2/5

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

There is no guidance about when to use this tool versus alternatives. The description only states what the tool does, not when it should be chosen or when another gitlab tool would be more appropriate.

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/iwilldotdev/dev.mcp'

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