Skip to main content
Glama

Search Project Code

gitlab_search_project_code
Read-onlyIdempotent

Search code within a specific GitLab project using keywords, filenames, extensions, paths, or refs to locate relevant files and snippets.

Instructions

Search code 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_project_code"
  }
}

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, openWorldHint=true, destructiveHint=false, so the safety profile is covered. The description adds nothing beyond that: no mention of required auth/scope, result limits or truncation, pagination behavior, or which ref is searched by default — material for a code-search tool that can return large result sets.

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?

A single short sentence with no wasted words and the scope clause front-loaded, but the brevity reflects under-specification rather than density. It earns its place only barely — there is no second sentence carrying payload.

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 an 8-parameter search tool with no output schema and no documented return shape, this is too thin. An agent cannot tell how filtering parameters combine, whether project_id is truly required (it is nullable), or what pagination defaults apply.

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, and the description supplies no per-parameter meaning at all. It never explains ref, path, filename, extension, page, or per_page, and does not even map its one hint ('specific project') to the nullable project_id field.

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 a scope qualifier ('in a specific project'), which implicitly separates it from the global/group-level siblings named gitlab_search_code and gitlab_search_group_code. Clear enough to select without opening the schema, though it never names an alternative explicitly.

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?

The description gives no when-to-use guidance, no exclusions, and no routing to alternatives despite three similarly named search siblings. An agent must infer from 'specific project' alone that project_id is the discriminator versus a global search.

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