Ir al contenido

Búsqueda

Búsqueda de texto completo, una acción por tipo de resultado: código, merge requests, issues, commits, hitos, notas, proyectos, snippets, usuarios y páginas wiki. Cada una busca en un proyecto o en un grupo cuando se le da uno, y en toda la instancia si no. search_type pide un motor de búsqueda, basic, advanced o zoekt, y GitLab rechaza uno que la instancia no tiene activado. Todas las acciones solo leen.

  • “Busca parseConfig en el código del grupo platform”
  • “Encuentra merge requests que mencionen el fallo del inicio de sesión”
  • “¿Qué issues mencionan timeout en el proyecto 42?”
  • Dinámica, la superficie predeterminada: llama a gitlab_execute_action con action igual al ID de la acción, como search.code, 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_search con action igual al nombre de la acción, como code, y sus parámetros en params.
  • Individual (GITLAB_MCP_TOOL_SURFACE=individual): llama a la herramienta propia de la acción, como gitlab_search_code, 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: 10 de 10, las que conserva un despliegue en modo de solo lectura. A un token con read_api y sin api se le sirven 10 de las 10.

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.5.0 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.

AcciónIndividual
search.codegitlab_search_code
search.commitsgitlab_search_commits
search.issuesgitlab_search_issues
search.merge_requestsgitlab_search_merge_requests
search.milestonesgitlab_search_milestones
search.notesgitlab_search_notes
search.projectsgitlab_search_projects
search.snippetsgitlab_search_snippets
search.usersgitlab_search_users
search.wikigitlab_search_wiki

Search code blobs across global, group, or project scope. Returns: matching blobs with file path, basename, ref, the line the snippet starts on, the snippet, project ID, and pagination metadata. On basic search a file that matched by its path also carries its blob ID, and its snippet is the start of the file rather than the lines around a match. On exact search such a file carries its path in place of a snippet. num_context_lines (0 to 20) sets the lines around each match on advanced and exact search, and regex chooses between a regular expression and literal text on exact search. See also: search.projects, repository.file_get, repository.tree.

  • Meta-herramienta: gitlab_search, acción code
  • Herramienta individual: gitlab_search_code
  • Nivel: Free
  • Token clásico u OAuth: read_api (o api)
  • Token de grano fino: una de: Global Search: Use en proyecto o Global Search: Use en grupo o Global Search: Use en usuario (página de permisos)
  • Comportamiento: solo lectura, idempotente
ParámetroTipoRequeridoDescripción
querystringsíSearch query text (param ‘query’ not ‘search’)
group_idstringnoGroup ID or URL-encoded path (optional)
num_context_linesintegernoLines of context GitLab sends around a code match, up to this many on each side, 0 to 20. Honored by advanced and exact code search (search_type advanced or zoekt), which send 2 and 1 by default, though exact search only from GitLab 19.5. GitLab Enterprise 18.11 and later refuses it on basic search, which a project search of a ref other than the default branch always runs, unless the token carries the mcp scope. Earlier releases and Community Edition ignore it
pageintegernoPage number to fetch, 1-based. Defaults to 1. Use the next_page field from the previous response to paginate forward.
per_pageintegernoItems per page. Defaults to 20, minimum 1, maximum 100. Use 100 to minimize round trips when the result set is large.
project_idstringnoProject ID or URL-encoded path (optional)
refstringnoBranch or tag name to search in (default: default branch)
regexbooleannoSearch the query as a regular expression (true) or as literal text (false). Honored by exact code search alone (search_type zoekt), which reads the query as a regular expression when this is left out. GitLab Enterprise 18.9 and later refuses it on any other backend, false included, and so on a project search of a ref other than the default branch, which always runs basic search, unless the token carries the mcp scope. Earlier releases and Community Edition ignore it
search_typestring (basic, advanced, zoekt)noSearch backend to request. Use ‘basic’ for GitLab’s default search, ‘advanced’ for Elasticsearch/OpenSearch-backed search, or ‘zoekt’ for Zoekt-based search. The requested backend must be enabled on the GitLab instance.

Search commit messages across global, group, or project scope. Returns: matching commits with short and full SHA, title, message, author, and committed date plus pagination metadata. See also: search.code, repository.commit_get, repository.file_history.

  • Meta-herramienta: gitlab_search, acción commits
  • Herramienta individual: gitlab_search_commits
  • Nivel: Free
  • Token clásico u OAuth: read_api (o api)
  • Token de grano fino: una de: Global Search: Use en proyecto o Global Search: Use en grupo o Global Search: Use en usuario (página de permisos)
  • Comportamiento: solo lectura, idempotente
ParámetroTipoRequeridoDescripción
querystringsíSearch query string
group_idstringnoGroup ID or URL-encoded path (optional)
pageintegernoPage number to fetch, 1-based. Defaults to 1. Use the next_page field from the previous response to paginate forward.
per_pageintegernoItems per page. Defaults to 20, minimum 1, maximum 100. Use 100 to minimize round trips when the result set is large.
project_idstringnoProject ID or URL-encoded path (optional)
refstringnoBranch or tag whose commits a project search reads (default: the default branch). Group and instance searches do not take it
search_typestring (basic, advanced, zoekt)noSearch backend to request. Use ‘basic’ for GitLab’s default search, ‘advanced’ for Elasticsearch/OpenSearch-backed search, or ‘zoekt’ for Zoekt-based search. The requested backend must be enabled on the GitLab instance.

Search issues across global, group, or project scope. Returns: matching issues with title, state, labels, assignees, author, and web URL plus pagination metadata. See also: search.merge_requests, issue.list, issue.get.

  • Meta-herramienta: gitlab_search, acción issues
  • Herramienta individual: gitlab_search_issues
  • Nivel: Free
  • Token clásico u OAuth: read_api (o api)
  • Token de grano fino: una de: Global Search: Use en proyecto o Global Search: Use en grupo o Global Search: Use en usuario (página de permisos)
  • Comportamiento: solo lectura, idempotente
ParámetroTipoRequeridoDescripción
querystringsíSearch query text (param ‘query’ not ‘search’)
group_idstringnoGroup ID or URL-encoded path (optional)
pageintegernoPage number to fetch, 1-based. Defaults to 1. Use the next_page field from the previous response to paginate forward.
per_pageintegernoItems per page. Defaults to 20, minimum 1, maximum 100. Use 100 to minimize round trips when the result set is large.
project_idstringnoProject ID or URL-encoded path (optional)
search_typestring (basic, advanced, zoekt)noSearch backend to request. Use ‘basic’ for GitLab’s default search, ‘advanced’ for Elasticsearch/OpenSearch-backed search, or ‘zoekt’ for Zoekt-based search. The requested backend must be enabled on the GitLab instance.

Search merge requests across global, group, or project scope. Returns: matching merge requests with title, state, author, source and target branches, and web URL plus pagination metadata. See also: search.issues, merge_request.list, merge_request.get.

  • Meta-herramienta: gitlab_search, acción merge_requests
  • Herramienta individual: gitlab_search_merge_requests
  • Nivel: Free
  • Token clásico u OAuth: read_api (o api)
  • Token de grano fino: una de: Global Search: Use en proyecto o Global Search: Use en grupo o Global Search: Use en usuario (página de permisos)
  • Comportamiento: solo lectura, idempotente
ParámetroTipoRequeridoDescripción
querystringsíSearch query text (param ‘query’ not ‘search’)
group_idstringnoGroup ID or URL-encoded path (optional)
pageintegernoPage number to fetch, 1-based. Defaults to 1. Use the next_page field from the previous response to paginate forward.
per_pageintegernoItems per page. Defaults to 20, minimum 1, maximum 100. Use 100 to minimize round trips when the result set is large.
project_idstringnoProject ID or URL-encoded path (optional)
search_typestring (basic, advanced, zoekt)noSearch backend to request. Use ‘basic’ for GitLab’s default search, ‘advanced’ for Elasticsearch/OpenSearch-backed search, or ‘zoekt’ for Zoekt-based search. The requested backend must be enabled on the GitLab instance.

Search milestones across global, group, or project scope. Returns: matching milestones with title, description, state, start and due dates, and web URL plus pagination metadata. See also: project.milestone_list, project.milestone_get, search.issues.

  • Meta-herramienta: gitlab_search, acción milestones
  • Herramienta individual: gitlab_search_milestones
  • Nivel: Free
  • Token clásico u OAuth: read_api (o api)
  • Token de grano fino: una de: Global Search: Use en proyecto o Global Search: Use en grupo o Global Search: Use en usuario (página de permisos)
  • Comportamiento: solo lectura, idempotente
ParámetroTipoRequeridoDescripción
querystringsíSearch query string
group_idstringnoGroup ID or URL-encoded path (optional)
pageintegernoPage number to fetch, 1-based. Defaults to 1. Use the next_page field from the previous response to paginate forward.
per_pageintegernoItems per page. Defaults to 20, minimum 1, maximum 100. Use 100 to minimize round trips when the result set is large.
project_idstringnoProject ID or URL-encoded path (optional)
search_typestring (basic, advanced, zoekt)noSearch backend to request. Use ‘basic’ for GitLab’s default search, ‘advanced’ for Elasticsearch/OpenSearch-backed search, or ‘zoekt’ for Zoekt-based search. The requested backend must be enabled on the GitLab instance.

Search note bodies within one project. Returns: matching notes with body, author, noteable type and ID, system and internal flags, and timestamps plus pagination metadata. See also: search.issues, search.merge_requests, issue.note_list.

  • Meta-herramienta: gitlab_search, acción notes
  • Herramienta individual: gitlab_search_notes
  • Nivel: Free
  • Token clásico u OAuth: read_api (o api)
  • Token de grano fino: Global Search: Use en proyecto (página de permisos)
  • Comportamiento: solo lectura, idempotente
ParámetroTipoRequeridoDescripción
project_idstringsíProject ID or URL-encoded path
querystringsíSearch query string
pageintegernoPage number to fetch, 1-based. Defaults to 1. Use the next_page field from the previous response to paginate forward.
per_pageintegernoItems per page. Defaults to 20, minimum 1, maximum 100. Use 100 to minimize round trips when the result set is large.
search_typestring (basic, advanced, zoekt)noSearch backend to request. Use ‘basic’ for GitLab’s default search, ‘advanced’ for Elasticsearch/OpenSearch-backed search, or ‘zoekt’ for Zoekt-based search. The requested backend must be enabled on the GitLab instance.

Search projects globally or within a group by name, path, or description. Returns: matching projects with namespace, visibility, default branch, and web URL plus pagination metadata. See also: project.get, project.list, search.code.

  • Meta-herramienta: gitlab_search, acción projects
  • Herramienta individual: gitlab_search_projects
  • Nivel: Free
  • Token clásico u OAuth: read_api (o api)
  • Token de grano fino: una de: Global Search: Use en grupo o Global Search: Use en usuario (página de permisos)
  • Comportamiento: solo lectura, idempotente
ParámetroTipoRequeridoDescripción
querystringsíSearch query string
group_idstringnoGroup ID or URL-encoded path. Omit for a global search
pageintegernoPage number to fetch, 1-based. Defaults to 1. Use the next_page field from the previous response to paginate forward.
per_pageintegernoItems per page. Defaults to 20, minimum 1, maximum 100. Use 100 to minimize round trips when the result set is large.
search_typestring (basic, advanced, zoekt)noSearch backend to request. Use ‘basic’ for GitLab’s default search, ‘advanced’ for Elasticsearch/OpenSearch-backed search, or ‘zoekt’ for Zoekt-based search. The requested backend must be enabled on the GitLab instance.

Search snippet titles globally. Returns: matching snippets with title, file name, description, visibility, author, project ID, web and raw URLs, and timestamps plus pagination metadata. See also: search.code, search.projects.

  • Meta-herramienta: gitlab_search, acción snippets
  • Herramienta individual: gitlab_search_snippets
  • Nivel: Free
  • Token clásico u OAuth: read_api (o api)
  • Token de grano fino: Global Search: Use en usuario (página de permisos)
  • Comportamiento: solo lectura, idempotente
ParámetroTipoRequeridoDescripción
querystringsíSearch query string
pageintegernoPage number to fetch, 1-based. Defaults to 1. Use the next_page field from the previous response to paginate forward.
per_pageintegernoItems per page. Defaults to 20, minimum 1, maximum 100. Use 100 to minimize round trips when the result set is large.
search_typestring (basic, advanced, zoekt)noSearch backend to request. Use ‘basic’ for GitLab’s default search, ‘advanced’ for Elasticsearch/OpenSearch-backed search, or ‘zoekt’ for Zoekt-based search. The requested backend must be enabled on the GitLab instance.

Search users across global, group, or project scope. Returns: matching users with ID, username, name, state, avatar URL, and web URL plus pagination metadata. See also: user.get, user.list, project.members.

  • Meta-herramienta: gitlab_search, acción users
  • Herramienta individual: gitlab_search_users
  • Nivel: Free
  • Token clásico u OAuth: read_api (o api)
  • Token de grano fino: una de: Global Search: Use en proyecto o Global Search: Use en grupo o Global Search: Use en usuario (página de permisos)
  • Comportamiento: solo lectura, idempotente
ParámetroTipoRequeridoDescripción
querystringsíSearch query string
group_idstringnoGroup ID or URL-encoded path (optional)
pageintegernoPage number to fetch, 1-based. Defaults to 1. Use the next_page field from the previous response to paginate forward.
per_pageintegernoItems per page. Defaults to 20, minimum 1, maximum 100. Use 100 to minimize round trips when the result set is large.
project_idstringnoProject ID or URL-encoded path (optional)
search_typestring (basic, advanced, zoekt)noSearch backend to request. Use ‘basic’ for GitLab’s default search, ‘advanced’ for Elasticsearch/OpenSearch-backed search, or ‘zoekt’ for Zoekt-based search. The requested backend must be enabled on the GitLab instance.

Search wiki blobs across global, group, or project scope. Returns: the file of each matching wiki page with its path (the page slug plus the format’s extension), ref, the line the snippet starts on, the snippet, its project ID and, from advanced search, its group ID (a page of a group wiki carries the group alone), and pagination metadata. On basic search a page whose file matched by its path also carries its blob ID, and its snippet is the start of the page. See also: search.code, wiki.list, wiki.get, group.wiki_get.

  • Meta-herramienta: gitlab_search, acción wiki
  • Herramienta individual: gitlab_search_wiki
  • Nivel: Free
  • Token clásico u OAuth: read_api (o api)
  • Token de grano fino: una de: Global Search: Use en proyecto o Global Search: Use en grupo o Global Search: Use en usuario (página de permisos)
  • Comportamiento: solo lectura, idempotente
ParámetroTipoRequeridoDescripción
querystringsíSearch query string
group_idstringnoGroup ID or URL-encoded path (optional)
pageintegernoPage number to fetch, 1-based. Defaults to 1. Use the next_page field from the previous response to paginate forward.
per_pageintegernoItems per page. Defaults to 20, minimum 1, maximum 100. Use 100 to minimize round trips when the result set is large.
project_idstringnoProject ID or URL-encoded path (optional)
refstringnoBranch or tag of the wiki repository a project search reads (default: the default branch). Group and instance searches do not take it
search_typestring (basic, advanced, zoekt)noSearch backend to request. Use ‘basic’ for GitLab’s default search, ‘advanced’ for Elasticsearch/OpenSearch-backed search, or ‘zoekt’ for Zoekt-based search. The requested backend must be enabled on the GitLab instance.