Skip to main content
Glama

Get Project Snippet

gitlab_get_project_snippet
Read-onlyIdempotent

Retrieve metadata for a GitLab project snippet, optionally including raw content from up to 10 files and specifying a revision with ref.

Instructions

Get a project snippet's metadata. Set include_content=true to also return the raw content of up to 10 files; ref overrides the snippet revision.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "snippet_id": "<snippet_id>"
    },
    "name": "gitlab_get_project_snippet"
  }
}

Input Schema

NameRequiredDescriptionDefault
refNo
project_idNo
snippet_idYes
include_contentNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv1.7.0

TDQS

A3.7/5.0
Behavior4/5

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

Annotations already declare readOnly, idempotent, non-destructive, so the safety profile is covered. The description adds a genuine behavioral detail beyond them: the opt-in content expansion is capped at 10 files, which tells the agent that not all file content is guaranteed to come back.

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, front-loaded with the core action and followed by the two options an agent would actually toggle. No restated name, 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?

Adequate for a simple read tool with no output schema, but it leaves open what "metadata" actually returns and what a null project_id means (personal vs project-scoped snippet), which matters for correct invocation. An agent could call it, but with some guesswork.

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 0%, so the description must compensate, and it does explain include_content and ref's override behavior. However, project_id (nullable in the schema) and the required snippet_id receive no semantic explanation, leaving half the parameters undocumented anywhere.

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+resource ("Get a project snippet's metadata") that clearly separates it from the create/update/delete/list snippet siblings. It does not name a sibling alternative, so it stops short of a 5.

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

Usage Guidelines3/5

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

The guidance is conditional-parameter advice (opt into content via include_content, use ref for a revision) rather than when-to-use/when-not guidance. It never says when to prefer this over gitlab_list_project_snippets or how it relates to the update/delete siblings, so usage is implied rather than stated.

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