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.
Preguntas de ejemplo
Sección titulada «Preguntas de ejemplo»- “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?”
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, comosearch.code, 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_searchconactionigual al nombre de la acción, comocode, y sus parámetros enparams. - Individual (
GITLAB_MCP_TOOL_SURFACE=individual): llama a la herramienta propia de la acción, comogitlab_search_code, 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: 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.
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. 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ón | Individual |
|---|---|
search.code | gitlab_search_code |
search.commits | gitlab_search_commits |
search.issues | gitlab_search_issues |
search.merge_requests | gitlab_search_merge_requests |
search.milestones | gitlab_search_milestones |
search.notes | gitlab_search_notes |
search.projects | gitlab_search_projects |
search.snippets | gitlab_search_snippets |
search.users | gitlab_search_users |
search.wiki | gitlab_search_wiki |
search.code
Sección titulada «search.code»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óncode - Herramienta individual:
gitlab_search_code - Nivel: Free
- Token clásico u OAuth:
read_api(oapi) - 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ámetro | Tipo | Requerido | Descripción |
|---|---|---|---|
query | string | sí | Search query text (param ‘query’ not ‘search’) |
group_id | string | no | Group ID or URL-encoded path (optional) |
num_context_lines | integer | no | Lines 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 |
page | integer | no | Page number to fetch, 1-based. Defaults to 1. Use the next_page field from the previous response to paginate forward. |
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. |
project_id | string | no | Project ID or URL-encoded path (optional) |
ref | string | no | Branch or tag name to search in (default: default branch) |
regex | boolean | no | Search 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_type | string (basic, advanced, zoekt) | no | Search 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.commits
Sección titulada «search.commits»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óncommits - Herramienta individual:
gitlab_search_commits - Nivel: Free
- Token clásico u OAuth:
read_api(oapi) - 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ámetro | Tipo | Requerido | Descripción |
|---|---|---|---|
query | string | sí | Search query string |
group_id | string | no | Group ID or URL-encoded path (optional) |
page | integer | no | Page number to fetch, 1-based. Defaults to 1. Use the next_page field from the previous response to paginate forward. |
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. |
project_id | string | no | Project ID or URL-encoded path (optional) |
ref | string | no | Branch or tag whose commits a project search reads (default: the default branch). Group and instance searches do not take it |
search_type | string (basic, advanced, zoekt) | no | Search 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
Sección titulada «search.issues»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ónissues - Herramienta individual:
gitlab_search_issues - Nivel: Free
- Token clásico u OAuth:
read_api(oapi) - 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ámetro | Tipo | Requerido | Descripción |
|---|---|---|---|
query | string | sí | Search query text (param ‘query’ not ‘search’) |
group_id | string | no | Group ID or URL-encoded path (optional) |
page | integer | no | Page number to fetch, 1-based. Defaults to 1. Use the next_page field from the previous response to paginate forward. |
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. |
project_id | string | no | Project ID or URL-encoded path (optional) |
search_type | string (basic, advanced, zoekt) | no | Search 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
Sección titulada «search.merge_requests»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ónmerge_requests - Herramienta individual:
gitlab_search_merge_requests - Nivel: Free
- Token clásico u OAuth:
read_api(oapi) - 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ámetro | Tipo | Requerido | Descripción |
|---|---|---|---|
query | string | sí | Search query text (param ‘query’ not ‘search’) |
group_id | string | no | Group ID or URL-encoded path (optional) |
page | integer | no | Page number to fetch, 1-based. Defaults to 1. Use the next_page field from the previous response to paginate forward. |
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. |
project_id | string | no | Project ID or URL-encoded path (optional) |
search_type | string (basic, advanced, zoekt) | no | Search 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
Sección titulada «search.milestones»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ónmilestones - Herramienta individual:
gitlab_search_milestones - Nivel: Free
- Token clásico u OAuth:
read_api(oapi) - 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ámetro | Tipo | Requerido | Descripción |
|---|---|---|---|
query | string | sí | Search query string |
group_id | string | no | Group ID or URL-encoded path (optional) |
page | integer | no | Page number to fetch, 1-based. Defaults to 1. Use the next_page field from the previous response to paginate forward. |
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. |
project_id | string | no | Project ID or URL-encoded path (optional) |
search_type | string (basic, advanced, zoekt) | no | Search 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.notes
Sección titulada «search.notes»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ónnotes - Herramienta individual:
gitlab_search_notes - Nivel: Free
- Token clásico u OAuth:
read_api(oapi) - Token de grano fino: Global Search: Use en proyecto (página de permisos)
- Comportamiento: solo lectura, idempotente
| Parámetro | Tipo | Requerido | Descripción |
|---|---|---|---|
project_id | string | sí | Project ID or URL-encoded path |
query | string | sí | Search query string |
page | integer | no | Page number to fetch, 1-based. Defaults to 1. Use the next_page field from the previous response to paginate forward. |
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. |
search_type | string (basic, advanced, zoekt) | no | Search 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
Sección titulada «search.projects»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ónprojects - Herramienta individual:
gitlab_search_projects - Nivel: Free
- Token clásico u OAuth:
read_api(oapi) - 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ámetro | Tipo | Requerido | Descripción |
|---|---|---|---|
query | string | sí | Search query string |
group_id | string | no | Group ID or URL-encoded path. Omit for a global search |
page | integer | no | Page number to fetch, 1-based. Defaults to 1. Use the next_page field from the previous response to paginate forward. |
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. |
search_type | string (basic, advanced, zoekt) | no | Search 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.snippets
Sección titulada «search.snippets»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ónsnippets - Herramienta individual:
gitlab_search_snippets - Nivel: Free
- Token clásico u OAuth:
read_api(oapi) - Token de grano fino: Global Search: Use en usuario (página de permisos)
- Comportamiento: solo lectura, idempotente
| Parámetro | Tipo | Requerido | Descripción |
|---|---|---|---|
query | string | sí | Search query string |
page | integer | no | Page number to fetch, 1-based. Defaults to 1. Use the next_page field from the previous response to paginate forward. |
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. |
search_type | string (basic, advanced, zoekt) | no | Search 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
Sección titulada «search.users»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ónusers - Herramienta individual:
gitlab_search_users - Nivel: Free
- Token clásico u OAuth:
read_api(oapi) - 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ámetro | Tipo | Requerido | Descripción |
|---|---|---|---|
query | string | sí | Search query string |
group_id | string | no | Group ID or URL-encoded path (optional) |
page | integer | no | Page number to fetch, 1-based. Defaults to 1. Use the next_page field from the previous response to paginate forward. |
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. |
project_id | string | no | Project ID or URL-encoded path (optional) |
search_type | string (basic, advanced, zoekt) | no | Search 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
Sección titulada «search.wiki»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ónwiki - Herramienta individual:
gitlab_search_wiki - Nivel: Free
- Token clásico u OAuth:
read_api(oapi) - 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ámetro | Tipo | Requerido | Descripción |
|---|---|---|---|
query | string | sí | Search query string |
group_id | string | no | Group ID or URL-encoded path (optional) |
page | integer | no | Page number to fetch, 1-based. Defaults to 1. Use the next_page field from the previous response to paginate forward. |
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. |
project_id | string | no | Project ID or URL-encoded path (optional) |
ref | string | no | Branch or tag of the wiki repository a project search reads (default: the default branch). Group and instance searches do not take it |
search_type | string (basic, advanced, zoekt) | no | Search 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. |