Snippet
gitlab_snippetCRUD GitLab snippets, manage threaded discussions, notes, and award emoji. Supports personal and project-scoped snippets with content and metadata operations, including browse and explore.
Instructions
Example: {"action":"content","params":{...}} For the params schema of any action, read the MCP resource gitlab://schema/meta/gitlab_snippet/.
Manage GitLab snippets (personal, project-scoped, and explore feed): CRUD snippet metadata and content, threaded discussions, notes (project snippets only), and award emoji on snippets and snippet notes. Delete is destructive and irreversible. When to use: store/share standalone code or text outside a repo, comment on existing snippets, react with emoji on a snippet or snippet note, browse public snippets via explore. NOT for: files in a repository (use gitlab_repository), wiki pages (use gitlab_wiki), MR/issue notes (use gitlab_mr_review or gitlab_issue), custom group emoji (use gitlab_custom_emoji — enterprise).
Returns:
*_list / list_all / explore: array with pagination.
*_get / *_create / *_update: snippet object {id, title, file_name, files, visibility, author, web_url, raw_url}.
content / project_content: raw snippet body as text.
file_content: raw content of a single file in a multi-file snippet.
discussion_* / note_*: discussion or note object.
emoji_*: award emoji object.
*_delete: {success: bool, message: string}. Errors: 404 not found, 403 forbidden (hint: requires Reporter+ for project snippets; private snippets require ownership), 400 invalid params (hint: visibility ∈ private/internal/public).
Param conventions: * = required. List actions accept page, per_page. visibility ∈ private/internal/public.
Personal snippets:
list / list_all / explore: (no required params)
get / content: snippet_id*
file_content: snippet_id*, file_path*
create: title*, file_name*, content*, visibility, description
update: snippet_id*, title, file_name, content, visibility, description
delete: snippet_id*
Project snippets:
project_list: project_id*
project_get / project_content: project_id*, snippet_id*
project_create: project_id*, title*, file_name*, content*, visibility
project_update: project_id*, snippet_id*, title, file_name, content, visibility
project_delete: project_id*, snippet_id*
Discussions (threaded):
discussion_list: snippet_id*
discussion_get: snippet_id*, discussion_id*
discussion_create: snippet_id*, body*
discussion_add_note: snippet_id*, discussion_id*, body*
discussion_update_note: snippet_id*, discussion_id*, note_id*, body*
discussion_delete_note: snippet_id*, discussion_id*, note_id*
Notes (project snippets only) — all need project_id*, snippet_id*:
note_list: order_by, sort
note_get / note_delete: note_id*
note_create: body*
note_update: note_id*, body*
Award emoji — all need project_id*, snippet_id* (snippet emoji) or project_id*, snippet_id*, note_id* (note emoji):
emoji_snippet_list / emoji_snippet_note_list: (no extra params)
emoji_snippet_get / emoji_snippet_note_get: award_id*
emoji_snippet_create / emoji_snippet_note_create: name*
emoji_snippet_delete / emoji_snippet_note_delete: award_id*
See also: gitlab_repository (project files and commits), gitlab_wiki (long-form project docs), gitlab_project (project membership and visibility), gitlab_custom_emoji (define group-level custom emoji).
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| action | Yes | Action to perform. Pick exactly one of the values in `enum`. Each action expects its own `params` object — see the tool description for the per-action parameter list. | |
| params | No | Action-specific parameters as a JSON object. Required and optional fields differ per action; consult this tool's description for the chosen action. Send only the fields documented for that action — unknown keys are rejected with a validation error (only reserved meta keys like `confirm` are stripped before validation). For the JSON Schema of a specific action's `params`, read the MCP resource `gitlab://schema/meta/{tool}/{action}` (replace placeholders with the tool name and the chosen action). |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| next_steps | No | Optional. Suggested follow-up actions or tool calls for the LLM, contextual to the result. | |
| pagination | No | Present on list actions. Use `has_more` and `next_page` to paginate through results. |