Skip to main content
Glama

create_snippet

Creates a new code snippet in a GitLab project; requires project ID, title, file name, content, and visibility.

Instructions

Create a new code snippet in a GitLab project

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
titleYesSnippet title summarizing the snippet
contentYesCode or text content of the snippet
file_nameYesFile name with extension (e.g. 'auth-interceptor.js' or 'setup.sh')
project_idYesProject numeric ID (e.g. 31) or namespace path (e.g. 'group/project-name'). URL-encoding is handled automatically.
visibilityYesSnippet visibility levelinternal
descriptionNoOptional description of the snippet

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv2.0.0

TDQS

C2.9/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 behavioral burden. It does not state that this is a mutating operation requiring write permissions, how the visibility default ('internal') affects exposure, or what happens on duplicate titles.

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?

A single, front-loaded sentence with no wasted words. It is appropriately terse, though that brevity comes at the cost of the behavioral details noted elsewhere.

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

Completeness2/5

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

For a 5-required-parameter mutation tool with no annotations and no output schema, the description is under-specified. It omits permission requirements, the effect of the visibility default, and what a successful call returns.

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 six parameters are already documented in the schema, including the project_id format and visibility enum. The description adds nothing beyond the schema, so the baseline of 3 applies.

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 (Create) and resource (code snippet) scoped to a GitLab project, which is clear. However it does not distinguish itself from siblings like update_snippet, get_snippet, or list_snippets beyond the create verb.

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?

No guidance on when to use this versus update_snippet or push_files, and no prerequisites or context about which project setups apply. The agent must infer usage entirely from the verb.

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