Skip to main content
Glama

Search

gitlab_search
Read-onlyIdempotent

Search 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

TableJSON Schema
NameRequiredDescriptionDefault
actionYesAction 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.
paramsNoAction-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

TableJSON Schema
NameRequiredDescriptionDefault
next_stepsNoOptional. Suggested follow-up actions or tool calls for the LLM, contextual to the result.
paginationNoPresent on list actions. Use `has_more` and `next_page` to paginate through results.
Behavior5/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Annotations already indicate readOnlyHint and idempotentHint. The description adds substantial behavioral details: error codes (403, 404, 400) with hints, pagination behavior, return shapes for each action, and scope constraints (e.g., snippets is global-only). No contradictions with annotations.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is relatively long but well-structured with clear sections (example, when to use, scope, pagination, returns, errors, per-action params). It is front-loaded with the most critical information. Minor redundancy could be trimmed, but overall efficient.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the complexity of the tool (10 actions with varying parameters and scope rules), the description covers all necessary aspects: usage boundaries, error handling, return types, pagination details, and cross-references to sibling tools. It is fully self-contained and leaves no major gaps.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters5/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

While the input schema has only two parameters (action, params), the description provides a detailed breakdown of required and optional fields for each action, including notes on scope limitations. This goes far beyond the schema's minimal descriptions and guides correct parameter usage.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the tool performs full-text search across GitLab for multiple entity types (code, MRs, issues, etc.). It distinguishes from siblings by listing specific exclusions like 'NOT for: discovering a project from a git remote (use gitlab_discover_project)'. The verb and resource are specific and unambiguous.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Provides explicit 'When to use' and 'NOT for' sections with direct references to alternative tools (gitlab_project, gitlab_issue, etc.). Also covers scope precedence, pagination, and required parameters per action, giving clear context for decision-making.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/jmrplens/gitlab-mcp-server'

If you have feedback or need assistance with the MCP directory API, please join our Discord server