Skip to main content
Glama

Search Code Blobs

gitlab_search_code_blobs
Read-onlyIdempotent

Search code blobs in a specific GitLab project by keyword, filename, extension, path, or ref to locate relevant repository files.

Instructions

Search repository code blobs in a specific project.

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_blobs"
  }
}

Input Schema

NameRequiredDescriptionDefault
refNo
pageNo
pathNo
searchYes
filenameNo
per_pageNo
extensionNo
project_idNo

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

C2.4/5.0
Behavior2/5

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

Annotations already declare readOnlyHint=true, idempotentHint=true, destructiveHint=false, and openWorldHint=true, so the safety profile is fully covered by structured data. The description adds only the project scoping constraint, which is already implied by the project_id parameter, and says nothing about result limits, pagination, or how the ref parameter affects which blob versions are searched.

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

Conciseness3/5

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

It is a single front-loaded sentence with no filler, so there is nothing to trim. However, the brevity comes at the cost of substance rather than from efficiency, making it under-specified rather than genuinely concise.

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?

With 8 undocumented parameters, no output schema, and several overlapping sibling search tools, the definition is far too thin for the complexity involved. An agent would have to open the raw schema and guess at parameter interactions before it could invoke this correctly.

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

Parameters1/5

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

Schema description coverage is 0% across 8 parameters, so the description carries the full explanatory burden and does not meet it. It never mentions search, filename, extension, path, ref, page, or per_page, leaving an agent unable to tell whether search matches content, path, or filename, or how the filtering parameters combine.

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?

The description states a specific verb and resource ("Search repository code blobs") and adds a scope qualifier ("in a specific project"), which implicitly separates it from group- or instance-wide code search siblings. It stops short of naming any alternative, so an agent must infer that distinction from the phrase "specific project" alone.

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

Usage Guidelines2/5

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

There is no guidance on when to choose this tool over gitlab_search_code, gitlab_search_project_code, or gitlab_search_group_code, all of which appear to overlap. No prerequisites, no exclusions, and no statement about what kind of match (content vs. path vs. filename) the search performs.

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