Skip to main content
Glama

Search Code

gitlab_search_code
Read-onlyIdempotent

Search code across all GitLab projects to find matches by content, filename, extension, or path. Requires GitLab code search support.

Instructions

Search code across all projects on the GitLab instance. Requires GitLab code search support.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "search": "<search>"
    },
    "name": "gitlab_search_code"
  }
}

Input Schema

NameRequiredDescriptionDefault
pageNo
pathNo
searchYes
filenameNo
per_pageNo
extensionNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed10 schema fields changedv1.7.0
    • removedInput schema / properties / extension / anyOf
      Removed value: -[
      -  {
      -    "type": "string"
      -  },
      -  {
      -    "type": "null"
      -  }
      -]
    • addedInput schema / properties / extension / type
      Added value: +[
      +  "string",
      +  "null"
      +]
    • removedInput schema / properties / filename / anyOf
      Removed value: -[
      -  {
      -    "type": "string"
      -  },
      -  {
      -    "type": "null"
      -  }
      -]
    • addedInput schema / properties / filename / type
      Added value: +[
      +  "string",
      +  "null"
      +]
    • removedInput schema / properties / page / anyOf
      Removed value: -[
      -  {
      -    "type": "number"
      -  },
      -  {
      -    "type": "null"
      -  }
      -]
    • addedInput schema / properties / page / type
      Added value: +[
      +  "number",
      +  "null"
      +]
    • removedInput schema / properties / path / anyOf
      Removed value: -[
      -  {
      -    "type": "string"
      -  },
      -  {
      -    "type": "null"
      -  }
      -]
    • addedInput schema / properties / path / type
      Added value: +[
      +  "string",
      +  "null"
      +]
    • removedInput schema / properties / per_page / anyOf
      Removed value: -[
      -  {
      -    "type": "number"
      -  },
      -  {
      -    "type": "null"
      -  }
      -]
    • addedInput schema / properties / per_page / type
      Added value: +[
      +  "number",
      +  "null"
      +]
  2. First observedv1.6.1

TDQS

B3.1/5.0
Behavior3/5

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

Annotations already declare readOnlyHint, idempotentHint, openWorldHint and destructiveHint=false, so the safety profile is covered. The description adds one genuinely useful behavioral fact beyond them: the instance must have code search (e.g. advanced search) enabled. It stays silent on what happens when support is missing, on result limits, and on pagination behavior.

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?

Two front-loaded sentences with no filler — the capability comes first, the prerequisite second. It is arguably undersized for a six-parameter search tool, but nothing is wasted or buried.

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

Completeness2/5

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

For a search tool with six entirely undocumented parameters and no output schema, the description leaves too much open: no filter semantics, no paging guidance, no result-shape hints. Only the scope and the search-support prerequisite are established.

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

Parameters2/5

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

Schema description coverage is 0% across six parameters, so the description must compensate and does not: path, filename, extension, page and per_page are never mentioned. The only implicit contribution is that no project/group scoping parameter exists, which is consistent with the instance-wide scope it states.

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

Purpose4/5

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

States a specific verb and resource ("Search code") plus scope ("across all projects on the GitLab instance"), which implicitly distinguishes it from the group-/project-scoped siblings. It does not name those siblings, so an agent must infer the distinction from scope wording alone.

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

Usage Guidelines3/5

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

"Across all projects on the GitLab instance" implies when to reach for this versus a narrower search, but no alternative is named and no explicit when-not condition is given. The prerequisite note ("Requires GitLab code search support") is context, not routing guidance.

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

Deploy Server

Other Tools