Snippets
Los snippets son fragmentos de código o de texto guardados fuera de un repositorio. Los snippets personales son del usuario: listarlos, leerlos, crearlos, actualizarlos y borrarlos, leer su contenido o un archivo de él, listar todos los snippets de la instancia (cosa de un administrador) y explorar los públicos. Los snippets de proyecto son las acciones snippet.project_*. Las discusiones en hilo y las notas de un snippet de proyecto, y los emoji de reacción en un snippet y en sus notas, también son acciones de este grupo.
Preguntas de ejemplo
Sección titulada «Preguntas de ejemplo»- “Lista mis snippets”
- “Crea un snippet con este script”
- “Muestra las discusiones del snippet 10 del proyecto 42”
Cómo llamarlo
Sección titulada «Cómo llamarlo»- Dinámica, la superficie predeterminada: llama a
gitlab_execute_actionconactionigual al ID de la acción, comosnippet.content, y sus parámetros enparams.gitlab_find_actionencuentra un ID a partir de una descripción de la tarea. - Meta (
GITLAB_MCP_TOOL_SURFACE=meta): llama agitlab_snippetconactionigual al nombre de la acción, comocontent, y sus parámetros enparams. - Individual (
GITLAB_MCP_TOOL_SURFACE=individual): llama a la herramienta propia de la acción, comogitlab_snippet_content, pasándole directamente sus parámetros.
Disponibilidad
Sección titulada «Disponibilidad»Todos los niveles sirven el grupo completo, tanto en instancias autogestionadas como en GitLab.com.
Acciones de solo lectura: 17 de 34, las que conserva un despliegue en modo de solo lectura.
Acciones
Sección titulada «Acciones»La descripción de cada acción, y la de cada uno de sus parámetros, es el texto que sirve el servidor para ella en la superficie predeterminada, citado tal cual; por eso está en inglés. Una acción destructiva solo se ejecuta una vez confirmada, salvo que GITLAB_MCP_YOLO_MODE (o AUTOPILOT) se salte ese paso: la superficie dinámica necesita confirm: true en gitlab_execute_action, y las otras dos aceptan un parámetro confirm o la pregunta del cliente (Acciones destructivas). Un parámetro seguido de un nivel entre paréntesis solo se sirve a partir de ese nivel.
| Acción | Individual |
|---|---|
snippet.content | gitlab_snippet_content |
snippet.create | gitlab_snippet_create |
snippet.delete | gitlab_snippet_delete |
snippet.discussion_add_note | gitlab_add_snippet_discussion_note |
snippet.discussion_create | gitlab_create_snippet_discussion |
snippet.discussion_delete_note | gitlab_delete_snippet_discussion_note |
snippet.discussion_get | gitlab_get_snippet_discussion |
snippet.discussion_list | gitlab_list_snippet_discussions |
snippet.discussion_update_note | gitlab_update_snippet_discussion_note |
snippet.emoji_snippet_create | gitlab_snippet_emoji_create |
snippet.emoji_snippet_delete | gitlab_snippet_emoji_delete |
snippet.emoji_snippet_get | gitlab_snippet_emoji_get |
snippet.emoji_snippet_list | gitlab_snippet_emoji_list |
snippet.emoji_snippet_note_create | gitlab_snippet_note_emoji_create |
snippet.emoji_snippet_note_delete | gitlab_snippet_note_emoji_delete |
snippet.emoji_snippet_note_get | gitlab_snippet_note_emoji_get |
snippet.emoji_snippet_note_list | gitlab_snippet_note_emoji_list |
snippet.explore | gitlab_snippet_explore |
snippet.file_content | gitlab_snippet_file_content |
snippet.get | gitlab_snippet_get |
snippet.list | gitlab_snippet_list |
snippet.list_all | gitlab_snippet_list_all |
snippet.note_create | gitlab_snippet_note_create |
snippet.note_delete | gitlab_snippet_note_delete |
snippet.note_get | gitlab_snippet_note_get |
snippet.note_list | gitlab_snippet_note_list |
snippet.note_update | gitlab_snippet_note_update |
snippet.project_content | gitlab_project_snippet_content |
snippet.project_create | gitlab_project_snippet_create |
snippet.project_delete | gitlab_project_snippet_delete |
snippet.project_get | gitlab_project_snippet_get |
snippet.project_list | gitlab_project_snippet_list |
snippet.project_update | gitlab_project_snippet_update |
snippet.update | gitlab_snippet_update |
snippet.content
Sección titulada «snippet.content»Read a personal snippet’s raw content. Returns: the snippet ID and raw text content. See also:
snippet.get,snippet.file_content.
- Meta-herramienta:
gitlab_snippet, accióncontent - Herramienta individual:
gitlab_snippet_content - Nivel: Free
- Comportamiento: solo lectura, idempotente
| Parámetro | Tipo | Requerido | Descripción |
|---|---|---|---|
snippet_id | integer | sí | Snippet ID |
snippet.create
Sección titulada «snippet.create»Create a personal snippet. Returns: the created snippet with ID, visibility, author, files, and web URL. See also:
snippet.get,snippet.update,snippet.list.
- Meta-herramienta:
gitlab_snippet, accióncreate - Herramienta individual:
gitlab_snippet_create - Nivel: Free
- Comportamiento: escribe, no idempotente
| Parámetro | Tipo | Requerido | Descripción |
|---|---|---|---|
title | string | sí | Snippet title |
content | string | no | Snippet content (single-file, deprecated in favor of files) |
description | string | no | Snippet description |
file_name | string | no | File name (single-file snippet, deprecated in favor of files) |
files | object[] | no | Files to include in the snippet |
visibility | string (private, internal, public) | no | Visibility: private, internal, or public. Defaults to private when omitted |
Además necesita al menos uno de estos: file_name y content; files.
snippet.delete
Sección titulada «snippet.delete»Delete a personal snippet permanently. Returns: a success confirmation. See also:
snippet.get,snippet.list.
- Meta-herramienta:
gitlab_snippet, accióndelete - Herramienta individual:
gitlab_snippet_delete - Nivel: Free
- Comportamiento: escribe, destructiva (necesita confirmación), idempotente
| Parámetro | Tipo | Requerido | Descripción |
|---|---|---|---|
snippet_id | integer | sí | Snippet ID |
snippet.discussion_add_note
Sección titulada «snippet.discussion_add_note»Add a reply note to an existing snippet discussion thread. Returns: the created note (author, body, timestamps). See also:
snippet.discussion_create,snippet.discussion_get,snippet.discussion_update_note.
- Meta-herramienta:
gitlab_snippet, accióndiscussion_add_note - Herramienta individual:
gitlab_add_snippet_discussion_note - Nivel: Free
- Comportamiento: escribe, no idempotente
| Parámetro | Tipo | Requerido | Descripción |
|---|---|---|---|
body | string | sí | Note body (Markdown supported) |
discussion_id | string | sí | Discussion ID to reply to |
project_id | string/integer | sí | Project ID or URL-encoded path |
snippet_id | integer | sí | Snippet ID |
created_at | string | no | Backdate the note creation time (ISO 8601, e.g. 2025-01-01T00:00:00Z). Requires admin or owner rights |
snippet.discussion_create
Sección titulada «snippet.discussion_create»Create a new discussion thread on a project snippet with an initial note. Returns: the created thread with its first note. See also:
snippet.discussion_add_note,snippet.discussion_list,snippet.note_create.
- Meta-herramienta:
gitlab_snippet, accióndiscussion_create - Herramienta individual:
gitlab_create_snippet_discussion - Nivel: Free
- Comportamiento: escribe, no idempotente
| Parámetro | Tipo | Requerido | Descripción |
|---|---|---|---|
body | string | sí | Discussion body (Markdown supported) |
project_id | string/integer | sí | Project ID or URL-encoded path |
snippet_id | integer | sí | Snippet ID |
created_at | string | no | Backdate the discussion creation time (ISO 8601, e.g. 2025-01-01T00:00:00Z). Requires admin or owner rights |
snippet.discussion_delete_note
Sección titulada «snippet.discussion_delete_note»Delete a note from a snippet discussion thread (destructive). Returns: a deletion confirmation message. See also:
snippet.discussion_update_note,snippet.discussion_get,snippet.discussion_list.
- Meta-herramienta:
gitlab_snippet, accióndiscussion_delete_note - Herramienta individual:
gitlab_delete_snippet_discussion_note - Nivel: Free
- Comportamiento: escribe, destructiva (necesita confirmación), idempotente
| Parámetro | Tipo | Requerido | Descripción |
|---|---|---|---|
discussion_id | string | sí | Discussion ID |
note_id | integer | sí | Note ID to delete |
project_id | string/integer | sí | Project ID or URL-encoded path |
snippet_id | integer | sí | Snippet ID |
snippet.discussion_get
Sección titulada «snippet.discussion_get»Get a single snippet discussion thread by its discussion id. Returns: the thread with every note (author, body, system flag, resolvable/resolved state). See also:
snippet.discussion_list,snippet.discussion_add_note,snippet.project_get.
- Meta-herramienta:
gitlab_snippet, accióndiscussion_get - Herramienta individual:
gitlab_get_snippet_discussion - Nivel: Free
- Comportamiento: solo lectura, idempotente
| Parámetro | Tipo | Requerido | Descripción |
|---|---|---|---|
discussion_id | string | sí | Discussion ID |
project_id | string/integer | sí | Project ID or URL-encoded path |
snippet_id | integer | sí | Snippet ID |
snippet.discussion_list
Sección titulada «snippet.discussion_list»List discussion threads on a project snippet with ordering and keyset pagination. Returns: discussion threads with their notes (author, body, system flag, resolvable state) and pagination metadata. See also:
snippet.discussion_get,snippet.discussion_create,snippet.project_get,snippet.note_list.
- Meta-herramienta:
gitlab_snippet, accióndiscussion_list - Herramienta individual:
gitlab_list_snippet_discussions - Nivel: Free
- Comportamiento: solo lectura, idempotente
| Parámetro | Tipo | Requerido | Descripción |
|---|---|---|---|
project_id | string/integer | sí | Project ID or URL-encoded path |
snippet_id | integer | sí | Snippet ID |
order_by | string | no | Column to order keyset-paginated results by (e.g. created_at, updated_at) |
page | integer | no | Page number to fetch, 1-based. Defaults to 1. Use the next_page field from the previous response to paginate forward. |
page_token | string | no | Keyset pagination cursor: record id at which to fetch the next page, taken from the previous keyset response. Only used when pagination=‘keyset’. |
pagination | string | no | Pagination method: ‘keyset’ for keyset-based pagination on large ordered result sets, or ‘offset’ (the default). Keyset avoids deep-offset cost. |
per_page | integer | no | Items per page. Defaults to 20, minimum 1, maximum 100. Use 100 to minimize round trips when the result set is large. |
sort | string (asc, desc) | no | Sort direction (asc or desc) |
snippet.discussion_update_note
Sección titulada «snippet.discussion_update_note»Update the body of a note in a snippet discussion thread. Returns: the updated note. See also:
snippet.discussion_add_note,snippet.discussion_delete_note,snippet.discussion_get.
- Meta-herramienta:
gitlab_snippet, accióndiscussion_update_note - Herramienta individual:
gitlab_update_snippet_discussion_note - Nivel: Free
- Comportamiento: escribe, idempotente
| Parámetro | Tipo | Requerido | Descripción |
|---|---|---|---|
body | string | sí | Updated note body |
discussion_id | string | sí | Discussion ID |
note_id | integer | sí | Note ID to update |
project_id | string/integer | sí | Project ID or URL-encoded path |
snippet_id | integer | sí | Snippet ID |
created_at | string | no | Override the note creation time (ISO 8601, e.g. 2025-01-01T00:00:00Z). Requires admin or owner rights |
snippet.emoji_snippet_create
Sección titulada «snippet.emoji_snippet_create»Add an emoji reaction to a project snippet. Returns: the created award with its emoji name, awarding user object, timestamps, and awardable id/type. See also:
snippet.emoji_snippet_list,snippet.emoji_snippet_delete.
- Meta-herramienta:
gitlab_snippet, acciónemoji_snippet_create - Herramienta individual:
gitlab_snippet_emoji_create - Nivel: Free
- Comportamiento: escribe, no idempotente
| Parámetro | Tipo | Requerido | Descripción |
|---|---|---|---|
name | string | sí | Emoji name without colons (e.g. thumbsup) |
project_id | string/integer | sí | Project ID or URL-encoded path |
snippet_id | integer | sí | Snippet ID |
snippet.emoji_snippet_delete
Sección titulada «snippet.emoji_snippet_delete»Remove an emoji reaction from a project snippet by award id. Returns: a success confirmation naming the award emoji. See also:
snippet.emoji_snippet_list,snippet.emoji_snippet_get.
- Meta-herramienta:
gitlab_snippet, acciónemoji_snippet_delete - Herramienta individual:
gitlab_snippet_emoji_delete - Nivel: Free
- Comportamiento: escribe, destructiva (necesita confirmación), idempotente
| Parámetro | Tipo | Requerido | Descripción |
|---|---|---|---|
award_id | integer | sí | Award emoji ID |
project_id | string/integer | sí | Project ID or URL-encoded path |
snippet_id | integer | sí | Snippet ID |
snippet.emoji_snippet_get
Sección titulada «snippet.emoji_snippet_get»Get a single emoji reaction on a project snippet by award id. Returns: the award with its emoji name, awarding user object, timestamps, and awardable id/type. See also:
snippet.emoji_snippet_list,snippet.emoji_snippet_delete.
- Meta-herramienta:
gitlab_snippet, acciónemoji_snippet_get - Herramienta individual:
gitlab_snippet_emoji_get - Nivel: Free
- Comportamiento: solo lectura, idempotente
| Parámetro | Tipo | Requerido | Descripción |
|---|---|---|---|
award_id | integer | sí | Award emoji ID |
project_id | string/integer | sí | Project ID or URL-encoded path |
snippet_id | integer | sí | Snippet ID |
snippet.emoji_snippet_list
Sección titulada «snippet.emoji_snippet_list»List all emoji reactions on a project snippet. Returns: each award with its emoji name, the awarding user object, awardable id/type, and pagination metadata. See also:
snippet.emoji_snippet_get,snippet.emoji_snippet_create,snippet.project_get.
- Meta-herramienta:
gitlab_snippet, acciónemoji_snippet_list - Herramienta individual:
gitlab_snippet_emoji_list - Nivel: Free
- Comportamiento: solo lectura, idempotente
| Parámetro | Tipo | Requerido | Descripción |
|---|---|---|---|
project_id | string/integer | sí | Project ID or URL-encoded path |
snippet_id | integer | sí | Snippet ID |
order_by | string | no | Column to order results by (e.g. created_at, updated_at, id). Used with keyset pagination. |
page | integer | no | Page number to fetch, 1-based. Defaults to 1. Use the next_page field from the previous response to paginate forward. |
page_token | string | no | Keyset pagination cursor: record id at which to fetch the next page, taken from the previous keyset response. Only used when pagination=‘keyset’. |
pagination | string | no | Pagination method: ‘keyset’ for keyset-based pagination on large ordered result sets, or ‘offset’ (the default). Keyset avoids deep-offset cost. |
per_page | integer | no | Items per page. Defaults to 20, minimum 1, maximum 100. Use 100 to minimize round trips when the result set is large. |
sort | string (asc, desc) | no | Sort order: ‘asc’ or ‘desc’. |
snippet.emoji_snippet_note_create
Sección titulada «snippet.emoji_snippet_note_create»Add an emoji reaction to a project snippet note. Returns: the created award with its emoji name, awarding user object, timestamps, and awardable id/type. See also:
snippet.emoji_snippet_note_list,snippet.emoji_snippet_note_delete.
- Meta-herramienta:
gitlab_snippet, acciónemoji_snippet_note_create - Herramienta individual:
gitlab_snippet_note_emoji_create - Nivel: Free
- Comportamiento: escribe, no idempotente
| Parámetro | Tipo | Requerido | Descripción |
|---|---|---|---|
name | string | sí | Emoji name without colons (e.g. thumbsup) |
note_id | integer | sí | Note ID |
project_id | string/integer | sí | Project ID or URL-encoded path |
snippet_id | integer | sí | Snippet ID |
snippet.emoji_snippet_note_delete
Sección titulada «snippet.emoji_snippet_note_delete»Remove an emoji reaction from a project snippet note by award id. Returns: a success confirmation naming the award emoji. See also:
snippet.emoji_snippet_note_list,snippet.emoji_snippet_note_get.
- Meta-herramienta:
gitlab_snippet, acciónemoji_snippet_note_delete - Herramienta individual:
gitlab_snippet_note_emoji_delete - Nivel: Free
- Comportamiento: escribe, destructiva (necesita confirmación), idempotente
| Parámetro | Tipo | Requerido | Descripción |
|---|---|---|---|
award_id | integer | sí | Award emoji ID |
note_id | integer | sí | Note ID |
project_id | string/integer | sí | Project ID or URL-encoded path |
snippet_id | integer | sí | Snippet ID |
snippet.emoji_snippet_note_get
Sección titulada «snippet.emoji_snippet_note_get»Get a single emoji reaction on a project snippet note by award id. Returns: the award with its emoji name, awarding user object, timestamps, and awardable id/type. See also:
snippet.emoji_snippet_note_list,snippet.emoji_snippet_note_delete.
- Meta-herramienta:
gitlab_snippet, acciónemoji_snippet_note_get - Herramienta individual:
gitlab_snippet_note_emoji_get - Nivel: Free
- Comportamiento: solo lectura, idempotente
| Parámetro | Tipo | Requerido | Descripción |
|---|---|---|---|
award_id | integer | sí | Award emoji ID |
note_id | integer | sí | Note ID |
project_id | string/integer | sí | Project ID or URL-encoded path |
snippet_id | integer | sí | Snippet ID |
snippet.emoji_snippet_note_list
Sección titulada «snippet.emoji_snippet_note_list»List all emoji reactions on a project snippet note (comment). Returns: each award with its emoji name, the awarding user object, awardable id/type, and pagination metadata. See also:
snippet.emoji_snippet_note_get,snippet.emoji_snippet_note_create,snippet.note_get.
- Meta-herramienta:
gitlab_snippet, acciónemoji_snippet_note_list - Herramienta individual:
gitlab_snippet_note_emoji_list - Nivel: Free
- Comportamiento: solo lectura, idempotente
| Parámetro | Tipo | Requerido | Descripción |
|---|---|---|---|
note_id | integer | sí | Note ID |
project_id | string/integer | sí | Project ID or URL-encoded path |
snippet_id | integer | sí | Snippet ID |
order_by | string | no | Column to order results by (e.g. created_at, updated_at, id). Used with keyset pagination. |
page | integer | no | Page number to fetch, 1-based. Defaults to 1. Use the next_page field from the previous response to paginate forward. |
page_token | string | no | Keyset pagination cursor: record id at which to fetch the next page, taken from the previous keyset response. Only used when pagination=‘keyset’. |
pagination | string | no | Pagination method: ‘keyset’ for keyset-based pagination on large ordered result sets, or ‘offset’ (the default). Keyset avoids deep-offset cost. |
per_page | integer | no | Items per page. Defaults to 20, minimum 1, maximum 100. Use 100 to minimize round trips when the result set is large. |
sort | string (asc, desc) | no | Sort order: ‘asc’ or ‘desc’. |
snippet.explore
Sección titulada «snippet.explore»List public snippets across the instance. Returns: public snippets with author, visibility, and pagination metadata. See also:
snippet.list,snippet.get.
- Meta-herramienta:
gitlab_snippet, acciónexplore - Herramienta individual:
gitlab_snippet_explore - Nivel: Free
- Comportamiento: solo lectura, idempotente
| Parámetro | Tipo | Requerido | Descripción |
|---|---|---|---|
order_by | string | no | Column to order results by for keyset pagination (e.g. id, created_at, updated_at) |
page | integer | no | Page number to fetch, 1-based. Defaults to 1. Use the next_page field from the previous response to paginate forward. |
page_token | string | no | Keyset pagination cursor: record id at which to fetch the next page, taken from the previous keyset response. Only used when pagination=‘keyset’. |
pagination | string | no | Pagination method: ‘keyset’ for keyset-based pagination on large ordered result sets, or ‘offset’ (the default). Keyset avoids deep-offset cost. |
per_page | integer | no | Items per page. Defaults to 20, minimum 1, maximum 100. Use 100 to minimize round trips when the result set is large. |
sort | string (asc, desc) | no | Sort direction (asc, desc) |
snippet.file_content
Sección titulada «snippet.file_content»Read one file from a multi-file personal snippet at a ref. Returns: the snippet ID, ref, file name, and raw content. See also:
snippet.content,snippet.get.
- Meta-herramienta:
gitlab_snippet, acciónfile_content - Herramienta individual:
gitlab_snippet_file_content - Nivel: Free
- Comportamiento: solo lectura, idempotente
| Parámetro | Tipo | Requerido | Descripción |
|---|---|---|---|
file_name | string | sí | File name to retrieve |
ref | string | sí | Git ref (branch, tag, or commit SHA) |
snippet_id | integer | sí | Snippet ID |
snippet.get
Sección titulada «snippet.get»Get a single personal snippet by ID. Returns: snippet metadata, visibility, author, files, and web URL. See also:
snippet.list,snippet.content,snippet.update,snippet.delete.
- Meta-herramienta:
gitlab_snippet, acciónget - Herramienta individual:
gitlab_snippet_get - Nivel: Free
- Comportamiento: solo lectura, idempotente
| Parámetro | Tipo | Requerido | Descripción |
|---|---|---|---|
snippet_id | integer | sí | Snippet ID |
snippet.list
Sección titulada «snippet.list»List snippets owned by the authenticated user. Returns: snippets with title, visibility, author, files, and pagination metadata. See also:
snippet.get,snippet.create,snippet.explore.
- Meta-herramienta:
gitlab_snippet, acciónlist - Herramienta individual:
gitlab_snippet_list - Nivel: Free
- Comportamiento: solo lectura, idempotente
| Parámetro | Tipo | Requerido | Descripción |
|---|---|---|---|
order_by | string | no | Column to order results by for keyset pagination (e.g. id, created_at, updated_at) |
page | integer | no | Page number to fetch, 1-based. Defaults to 1. Use the next_page field from the previous response to paginate forward. |
page_token | string | no | Keyset pagination cursor: record id at which to fetch the next page, taken from the previous keyset response. Only used when pagination=‘keyset’. |
pagination | string | no | Pagination method: ‘keyset’ for keyset-based pagination on large ordered result sets, or ‘offset’ (the default). Keyset avoids deep-offset cost. |
per_page | integer | no | Items per page. Defaults to 20, minimum 1, maximum 100. Use 100 to minimize round trips when the result set is large. |
sort | string (asc, desc) | no | Sort direction (asc, desc) |
snippet.list_all
Sección titulada «snippet.list_all»List all snippets on the instance (admin). Returns: snippets with author, visibility, repository storage, and pagination metadata. See also:
snippet.list,snippet.explore,snippet.get.
- Meta-herramienta:
gitlab_snippet, acciónlist_all - Herramienta individual:
gitlab_snippet_list_all - Nivel: Free
- Comportamiento: solo lectura, idempotente
| Parámetro | Tipo | Requerido | Descripción |
|---|---|---|---|
created_after | string | no | Filter snippets created after (ISO 8601) |
created_before | string | no | Filter snippets created before (ISO 8601) |
order_by | string | no | Column to order results by for keyset pagination (e.g. id, created_at, updated_at) |
page | integer | no | Page number to fetch, 1-based. Defaults to 1. Use the next_page field from the previous response to paginate forward. |
page_token | string | no | Keyset pagination cursor: record id at which to fetch the next page, taken from the previous keyset response. Only used when pagination=‘keyset’. |
pagination | string | no | Pagination method: ‘keyset’ for keyset-based pagination on large ordered result sets, or ‘offset’ (the default). Keyset avoids deep-offset cost. |
per_page | integer | no | Items per page. Defaults to 20, minimum 1, maximum 100. Use 100 to minimize round trips when the result set is large. |
repository_storage (Premium) | string | no | Filter by repository storage name (admin only) |
sort | string (asc, desc) | no | Sort direction (asc, desc) |
snippet.note_create
Sección titulada «snippet.note_create»Add a comment (note) to a project snippet. Returns: the created note with id, author, body, and timestamps. See also:
snippet.note_list,snippet.note_get,snippet.project_get.
- Meta-herramienta:
gitlab_snippet, acciónnote_create - Herramienta individual:
gitlab_snippet_note_create - Nivel: Free
- Comportamiento: escribe, no idempotente
| Parámetro | Tipo | Requerido | Descripción |
|---|---|---|---|
body | string | sí | Note body (Markdown supported) |
project_id | string/integer | sí | Project ID or URL-encoded path |
snippet_id | integer | sí | Snippet ID |
created_at | string | no | Backdate the note to this RFC 3339 timestamp (e.g. 2026-01-15T10:00:00Z). Requires administrator or project/group owner permissions. Ignored otherwise. |
snippet.note_delete
Sección titulada «snippet.note_delete»Delete a snippet note permanently. Returns: a success confirmation naming the note, snippet, and project. See also:
snippet.note_get,snippet.note_list.
- Meta-herramienta:
gitlab_snippet, acciónnote_delete - Herramienta individual:
gitlab_snippet_note_delete - Nivel: Free
- Comportamiento: escribe, destructiva (necesita confirmación), idempotente
| Parámetro | Tipo | Requerido | Descripción |
|---|---|---|---|
note_id | integer | sí | ID of the note to delete |
project_id | string/integer | sí | Project ID or URL-encoded path |
snippet_id | integer | sí | Snippet ID |
snippet.note_get
Sección titulada «snippet.note_get»Get a single snippet note by its ID. Returns: the note with author, body, timestamps, and position. See also:
snippet.note_list,snippet.note_update,snippet.note_delete.
- Meta-herramienta:
gitlab_snippet, acciónnote_get - Herramienta individual:
gitlab_snippet_note_get - Nivel: Free
- Comportamiento: solo lectura, idempotente
| Parámetro | Tipo | Requerido | Descripción |
|---|---|---|---|
note_id | integer | sí | ID of the note to retrieve |
project_id | string/integer | sí | Project ID or URL-encoded path |
snippet_id | integer | sí | Snippet ID |
snippet.note_list
Sección titulada «snippet.note_list»List all notes (comments) on a project snippet. Returns: notes with author, body, system flag, and pagination metadata. See also:
snippet.note_get,snippet.note_create,snippet.project_get.
- Meta-herramienta:
gitlab_snippet, acciónnote_list - Herramienta individual:
gitlab_snippet_note_list - Nivel: Free
- Comportamiento: solo lectura, idempotente
| Parámetro | Tipo | Requerido | Descripción |
|---|---|---|---|
project_id | string/integer | sí | Project ID or URL-encoded path |
snippet_id | integer | sí | Snippet ID |
order_by | string (created_at, updated_at) | no | Order by field (created_at, updated_at) |
page | integer | no | Page number to fetch, 1-based. Defaults to 1. Use the next_page field from the previous response to paginate forward. |
page_token | string | no | Keyset pagination cursor: record id at which to fetch the next page, taken from the previous keyset response. Only used when pagination=‘keyset’. |
pagination | string | no | Pagination method: ‘keyset’ for keyset-based pagination on large ordered result sets, or ‘offset’ (the default). Keyset avoids deep-offset cost. |
per_page | integer | no | Items per page. Defaults to 20, minimum 1, maximum 100. Use 100 to minimize round trips when the result set is large. |
sort | string (asc, desc) | no | Sort direction (asc, desc) |
snippet.note_update
Sección titulada «snippet.note_update»Update a snippet note’s body. Returns: the updated note with new body and updated_at timestamp. See also:
snippet.note_get,snippet.note_list,snippet.note_delete.
- Meta-herramienta:
gitlab_snippet, acciónnote_update - Herramienta individual:
gitlab_snippet_note_update - Nivel: Free
- Comportamiento: escribe, idempotente
| Parámetro | Tipo | Requerido | Descripción |
|---|---|---|---|
body | string | sí | Updated note body (Markdown supported) |
note_id | integer | sí | ID of the note to update |
project_id | string/integer | sí | Project ID or URL-encoded path |
snippet_id | integer | sí | Snippet ID |
snippet.project_content
Sección titulada «snippet.project_content»Read a project snippet’s raw content. Returns: the snippet ID and raw text content. See also:
snippet.project_get,snippet.project_list.
- Meta-herramienta:
gitlab_snippet, acciónproject_content - Herramienta individual:
gitlab_project_snippet_content - Nivel: Free
- Comportamiento: solo lectura, idempotente
| Parámetro | Tipo | Requerido | Descripción |
|---|---|---|---|
project_id | string/integer | sí | Project ID or path |
snippet_id | integer | sí | Snippet ID |
snippet.project_create
Sección titulada «snippet.project_create»Create a project snippet. Returns: the created snippet with ID, visibility, author, files, and web URL. See also:
snippet.project_get,snippet.project_update,snippet.project_list.
- Meta-herramienta:
gitlab_snippet, acciónproject_create - Herramienta individual:
gitlab_project_snippet_create - Nivel: Free
- Comportamiento: escribe, no idempotente
| Parámetro | Tipo | Requerido | Descripción |
|---|---|---|---|
project_id | string | sí | Project ID or path |
title | string | sí | Snippet title |
content | string | no | Content (single-file, deprecated in favor of files) |
description | string | no | Snippet description |
file_name | string | no | File name (single-file, deprecated in favor of files) |
files | object[] | no | Files to include in the snippet |
visibility | string (private, internal, public) | no | Visibility: private, internal, or public. Defaults to private when omitted |
Además necesita al menos uno de estos: file_name y content; files.
snippet.project_delete
Sección titulada «snippet.project_delete»Delete a project snippet permanently. Returns: a success confirmation. See also:
snippet.project_get,snippet.project_list.
- Meta-herramienta:
gitlab_snippet, acciónproject_delete - Herramienta individual:
gitlab_project_snippet_delete - Nivel: Free
- Comportamiento: escribe, destructiva (necesita confirmación), idempotente
| Parámetro | Tipo | Requerido | Descripción |
|---|---|---|---|
project_id | string/integer | sí | Project ID or path |
snippet_id | integer | sí | Snippet ID |
snippet.project_get
Sección titulada «snippet.project_get»Get a single project snippet. Returns: snippet metadata, visibility, author, files, and web URL. See also:
snippet.project_list,snippet.project_content,snippet.project_update,snippet.project_delete.
- Meta-herramienta:
gitlab_snippet, acciónproject_get - Herramienta individual:
gitlab_project_snippet_get - Nivel: Free
- Comportamiento: solo lectura, idempotente
| Parámetro | Tipo | Requerido | Descripción |
|---|---|---|---|
project_id | string/integer | sí | Project ID or path |
snippet_id | integer | sí | Snippet ID |
snippet.project_list
Sección titulada «snippet.project_list»List a project’s snippets. Returns: snippets with title, visibility, author, files, and pagination metadata. See also:
snippet.project_get,snippet.project_create,snippet.list.
- Meta-herramienta:
gitlab_snippet, acciónproject_list - Herramienta individual:
gitlab_project_snippet_list - Nivel: Free
- Comportamiento: solo lectura, idempotente
| Parámetro | Tipo | Requerido | Descripción |
|---|---|---|---|
project_id | string/integer | sí | Project ID or path |
order_by | string | no | Column to order results by for keyset pagination (e.g. id, created_at, updated_at) |
page | integer | no | Page number to fetch, 1-based. Defaults to 1. Use the next_page field from the previous response to paginate forward. |
page_token | string | no | Keyset pagination cursor: record id at which to fetch the next page, taken from the previous keyset response. Only used when pagination=‘keyset’. |
pagination | string | no | Pagination method: ‘keyset’ for keyset-based pagination on large ordered result sets, or ‘offset’ (the default). Keyset avoids deep-offset cost. |
per_page | integer | no | Items per page. Defaults to 20, minimum 1, maximum 100. Use 100 to minimize round trips when the result set is large. |
sort | string (asc, desc) | no | Sort direction (asc, desc) |
snippet.project_update
Sección titulada «snippet.project_update»Update a project snippet. Returns: the updated snippet with metadata, files, and web URL. See also:
snippet.project_get,snippet.project_delete,snippet.project_list.
- Meta-herramienta:
gitlab_snippet, acciónproject_update - Herramienta individual:
gitlab_project_snippet_update - Nivel: Free
- Comportamiento: escribe, idempotente
| Parámetro | Tipo | Requerido | Descripción |
|---|---|---|---|
project_id | string/integer | sí | Project ID or path |
snippet_id | integer | sí | Snippet ID |
content | string | no | New content (single-file, deprecated in favor of files) |
description | string | no | New description |
file_name | string | no | New file name (single-file, deprecated in favor of files) |
files | object[] | no | File operations to apply |
title | string | no | New title |
visibility | string (private, internal, public) | no | New visibility: private, internal, or public |
snippet.update
Sección titulada «snippet.update»Update a personal snippet. Returns: the updated snippet with metadata, files, and web URL. See also:
snippet.get,snippet.delete,snippet.list.
- Meta-herramienta:
gitlab_snippet, acciónupdate - Herramienta individual:
gitlab_snippet_update - Nivel: Free
- Comportamiento: escribe, idempotente
| Parámetro | Tipo | Requerido | Descripción |
|---|---|---|---|
snippet_id | integer | sí | Snippet ID |
content | string | no | New content (single-file, deprecated in favor of files) |
description | string | no | New description |
file_name | string | no | New file name (single-file, deprecated in favor of files) |
files | object[] | no | File operations to apply |
title | string | no | New title |
visibility | string (private, internal, public) | no | New visibility: private, internal, or public |