Skip to main content
Glama

gitlab_list_snippets

Retrieve project code snippets with metadata to browse reusable code components. Supports pagination and filtering by project for organized access.

Instructions

List project snippets Returns: Array of snippets with metadata Use when: Browsing code snippets, finding reusable code Pagination: Yes (default 20 per page) Filtering: By project

Example response: [{ "id": 123, "title": "Database Helper", "file_name": "db_helper.py", "description": "Common database operations", "visibility": "private", "author": {"name": "John Doe"}, "created_at": "2023-01-01T00:00:00Z", "web_url": "https://gitlab.com/group/project/snippets/123" }]

Related tools:

  • gitlab_get_snippet: Get snippet content

  • gitlab_create_snippet: Create new snippet

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
project_idNoProject identifier (auto-detected if not provided) Type: integer OR string Format: numeric ID or 'namespace/project' Optional: Yes - auto-detects from current git repository Examples: - 12345 (numeric ID) - 'gitlab-org/gitlab' (namespace/project path) - 'my-group/my-subgroup/my-project' (nested groups) Note: If in a git repo with GitLab remote, this can be omitted
per_pageNoNumber of results per page Type: integer Range: 1-100 Default: 20 Example: 50 (for faster browsing) Tip: Use smaller values (10-20) for detailed operations, larger (50-100) for listing
pageNoPage number for pagination Type: integer Range: ≥1 Default: 1 Example: 3 (to get the third page of results) Note: Use with per_page to navigate large result sets
Behavior4/5

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

With no annotations provided, the description carries full burden and does well by disclosing key behaviors: it returns an array with metadata, supports pagination (default 20 per page), and filters by project. It also provides a detailed example response format. However, it doesn't mention rate limits, authentication requirements, or error handling.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is well-structured with clear sections (Returns, Use when, Pagination, Filtering, Example response, Related tools) and uses bullet points efficiently. Every sentence earns its place, though the example response is quite detailed, which is helpful but adds length.

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 list tool with no annotations and no output schema, the description provides good context: purpose, usage, pagination behavior, filtering scope, example response format, and related tools. It covers the essential aspects an agent needs to invoke it correctly, though it could mention authentication or error scenarios.

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 documents all three parameters thoroughly. The description doesn't add any parameter-specific information beyond what's in the schema, but it does mention 'Filtering: By project' which aligns with the project_id parameter. Baseline 3 is appropriate when schema does the heavy lifting.

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 verb 'List' and resource 'project snippets', distinguishing it from sibling tools like gitlab_get_snippet (for content) and gitlab_create_snippet (for creation). The title 'List project snippets' is specific and unambiguous.

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

Usage Guidelines5/5

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

The description explicitly states 'Use when: Browsing code snippets, finding reusable code' and lists related tools with their specific purposes (gitlab_get_snippet for content, gitlab_create_snippet for creation). This provides clear guidance on when to use this tool versus alternatives.

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

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