Skip to main content
Glama

get_snippet

Fetches a GitLab snippet's details and raw code content by ID. Use it to retrieve specific snippet metadata or download the source file for a given project.

Instructions

Get code snippet details and raw file content by snippet ID

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
rawYesIf true, also fetches the raw code content of the snippet
project_idYesProject numeric ID (e.g. 31) or namespace path (e.g. 'group/project-name'). URL-encoding is handled automatically.
snippet_idYesNumeric snippet ID

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv2.0.0

TDQS

B3.1/5.0
Behavior2/5

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

No annotations are provided, so the description carries the full burden. 'Get' implies a read operation, but the description omits permission requirements, whether the call has side effects, error behavior, and how the raw boolean affects the response. It only states that raw file content may be returned.

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?

A single, front-loaded sentence with no wasted words. It states the core action and scope immediately.

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 three-parameter read tool with full schema coverage, the description is minimally adequate: it names the resource and mentions raw content. However, with no annotations and no output schema, it should do more to cover read-only behavior, permission expectations, and the raw parameter's effect on the result.

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 all three parameters are already documented in the schema. The description adds no meaning beyond restating that retrieval is by snippet ID and may include raw content; baseline 3 applies when the schema does the heavy lifting.

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?

States a specific verb (Get) and resource (code snippet details and raw file content) and indicates lookup by snippet ID. It does not explicitly differentiate from sibling list_snippets, but the singular ID-based retrieval is clear enough for an agent to distinguish.

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?

Provides no when-to-use guidance, prerequisites, or alternatives. An agent must infer that this is for retrieving a single snippet and that list_snippets should be used for browsing.

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