Ir al contenido

Wikis de proyecto

La wiki de un proyecto: listar sus páginas, leer una, crear, actualizar y borrar una, y subir un archivo adjunto que una página puede referenciar. Las wikis de grupo son acciones de Grupos, que se sirven a partir de Premium.

  • “Lista las páginas de la wiki del proyecto 42”
  • “Muestra la página Home de la wiki”
  • “Crea una página de la wiki con la lista de comprobación de la release”
  • Dinámica, la superficie predeterminada: llama a gitlab_execute_action con action igual al ID de la acción, como wiki.create, y sus parámetros en params. gitlab_find_action encuentra un ID a partir de una descripción de la tarea.
  • Meta (GITLAB_MCP_TOOL_SURFACE=meta): llama a gitlab_wiki con action igual al nombre de la acción, como create, y sus parámetros en params.
  • Individual (GITLAB_MCP_TOOL_SURFACE=individual): llama a la herramienta propia de la acción, como gitlab_wiki_create, pasándole directamente sus parámetros.

Todos los niveles sirven el grupo completo, tanto en instancias autogestionadas como en GitLab.com.

Acciones de solo lectura: 2 de 6, las que conserva un despliegue en modo de solo lectura. A un token con read_api y sin api se le sirven 2 de las 6.

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. Las líneas de token dicen lo que exige GitLab 19.6.1 a un token para las peticiones que envía cada acción; en una instancia con Admin Mode activado, una acción que solo puede ejecutar un administrador necesita además admin_mode. 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).

Acción Individual
wiki.create gitlab_wiki_create
wiki.delete gitlab_wiki_delete
wiki.get gitlab_wiki_get
wiki.list gitlab_wiki_list
wiki.update gitlab_wiki_update
wiki.upload_attachment gitlab_wiki_upload_attachment

Create a new wiki page. Returns: the created page with title, slug, format, content, and encoding. See also: wiki.get, wiki.update, wiki.list.

  • Meta-herramienta: gitlab_wiki, acción create
  • Herramienta individual: gitlab_wiki_create
  • Nivel: Free
  • Token clásico u OAuth: api
  • Token de grano fino: Wiki: Create en proyecto (página de permisos)
  • Comportamiento: escribe, no idempotente
Parámetro Tipo Requerido Descripción
content string sí Content of the wiki page (Markdown, RDoc, AsciiDoc, or Org)
project_id string/integer sí Project ID or URL-encoded path
title string sí Title of the wiki page
format string (markdown, rdoc, asciidoc, org) no Content format: markdown (default), rdoc, asciidoc, or org

Delete a wiki page permanently. Returns: a success confirmation for the removed page. See also: wiki.get, wiki.list.

  • Meta-herramienta: gitlab_wiki, acción delete
  • Herramienta individual: gitlab_wiki_delete
  • Nivel: Free
  • Token clásico u OAuth: api
  • Token de grano fino: Wiki: Delete en proyecto (página de permisos)
  • Comportamiento: escribe, destructiva (necesita confirmación), idempotente
Parámetro Tipo Requerido Descripción
project_id string/integer sí Project ID or URL-encoded path
slug string sí Slug of the wiki page to delete as wiki.list returns it (e.g. ‘dir/page’)

Get a single wiki page by slug. Returns: the page title, slug, format, content, and encoding. See also: wiki.list, wiki.update, wiki.delete.

  • Meta-herramienta: gitlab_wiki, acción get
  • Herramienta individual: gitlab_wiki_get
  • Nivel: Free
  • Token clásico u OAuth: read_api (o api)
  • Token de grano fino: Wiki: Read en proyecto (página de permisos)
  • Comportamiento: solo lectura, idempotente
Parámetro Tipo Requerido Descripción
project_id string/integer sí Project ID or URL-encoded path
slug string sí Slug of the wiki page as wiki.list returns it, a subpage with its slash (e.g. ‘my-page’ or ‘dir/page’)
render_html boolean no Return HTML-rendered content instead of raw format
version string no Wiki page version SHA to retrieve a specific revision

List a project’s wiki pages. Returns: each page’s title, slug, and format (plus content when with_content is set), with hints to read or create pages. See also: wiki.get, wiki.create.

  • Meta-herramienta: gitlab_wiki, acción list
  • Herramienta individual: gitlab_wiki_list
  • Nivel: Free
  • Token clásico u OAuth: read_api (o api)
  • Token de grano fino: Wiki: Read en proyecto (página de permisos)
  • Comportamiento: solo lectura, idempotente
Parámetro Tipo Requerido Descripción
project_id string/integer sí Project ID or URL-encoded path
with_content boolean no Include page content in the response

Update an existing wiki page by slug. Returns: the updated page with title, slug, format, content, and encoding. See also: wiki.get, wiki.delete, wiki.list.

  • Meta-herramienta: gitlab_wiki, acción update
  • Herramienta individual: gitlab_wiki_update
  • Nivel: Free
  • Token clásico u OAuth: api
  • Token de grano fino: Wiki: Update en proyecto (página de permisos)
  • Comportamiento: escribe, idempotente
Parámetro Tipo Requerido Descripción
project_id string/integer sí Project ID or URL-encoded path
slug string sí Slug of the wiki page to update as wiki.list returns it (e.g. ‘dir/page’)
content string no New content for the wiki page. Pass an empty string to empty the page. Omit the field to leave it untouched
format string (markdown, rdoc, asciidoc, org) no Content format: markdown, rdoc, asciidoc, or org
title string no New title for the wiki page

Upload an attachment to the project wiki repository. Returns: the attachment file name, file path, branch, URL, and ready-to-paste Markdown link. See also: wiki.get, wiki.update.

  • Meta-herramienta: gitlab_wiki, acción upload_attachment
  • Herramienta individual: gitlab_wiki_upload_attachment
  • Nivel: Free
  • Token clásico u OAuth: api
  • Token de grano fino: Wiki: Update en proyecto (página de permisos)
  • Comportamiento: escribe, no idempotente
Parámetro Tipo Requerido Descripción
filename string sí Name of the file to upload (e.g. diagram.png)
project_id string/integer sí Project ID or URL-encoded path
branch string no Branch to upload the attachment to
content_base64 string no Base64-encoded file content. Provide either content_base64 or file_path
file_path string no Absolute path to a local file. Provide either file_path or content_base64