Search
gitlab_searchSearch GitLab across instance, group, or project for code, merge requests, issues, commits, milestones, notes, projects, snippets, users, and wiki pages using full-text queries.
Instructions
Example: {"action":"code","params":{...}} For the params schema of any action, read the MCP resource gitlab://schema/meta/gitlab_search/.
Search GitLab by scope (instance / group / project) for code, MRs, issues, commits, milestones, notes, projects, snippets, users, or wiki pages. Read-only. When to use: full-text search across the supplied scope. Most actions accept project_id and / or group_id; if both are omitted the search runs at instance level (an authenticated user always has implicit instance scope on GitLab.com). NOT for: discovering a project from a git remote (use gitlab_discover_project), listing labels / milestones / issues with structured filters (use gitlab_project, gitlab_issue, gitlab_merge_request — those support filters like state/labels/milestone), reading file contents (use gitlab_repository file_get).
Scope precedence: project_id > group_id > global. Pagination: page, per_page (max 100). All actions need query*.
Returns:
code: array of {basename, data, path, ref, startline, project_id} blobs.
merge_requests / issues: arrays of MR / issue objects.
commits: array of {id, short_id, title, author_name, committed_date, project_id}.
milestones / projects / snippets / users / wiki: arrays of resource summaries.
notes: array of {id, body, notable_type, notable_id, notable_iid} entries. All lists paginate with {page, per_page, total, next_page}. Errors: 403 (hint: project_id / group_id must be visible to the caller), 404 (hint: project_id / group_id wrong or no permission), 400 (hint: query must not be empty; some scopes only support global — e.g. snippets).
code: query*, project_id, group_id, ref
merge_requests / issues / commits / milestones / users / wiki: query*, project_id, group_id
notes: query*, project_id* (project-scoped only)
projects: query*, group_id
snippets: query* (global only)
See also: gitlab_discover_project (resolve git remote URL → project_id), gitlab_project / gitlab_merge_request / gitlab_issue (structured filtering).
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. |