Skip to main content
Glama
GitLab MCP Server

GitLab MCP Server

by ttpears

Browse Repository

browse_repository
Read-onlyIdempotent

Browse repository files and folders to explore codebase structure, navigate directories, and inspect branches, tags, or commits.

Instructions

Browse repository files and folders - essential for exploring codebase structure

Input Schema

NameRequiredDescriptionDefault
refNoGit reference (branch, tag, or commit SHA)HEAD
pathNoDirectory path to browse (empty for root)
projectPathYesFull path of the project (e.g., "group/project-name")
userCredentialsNoYour GitLab credentials (optional — falls back to the configured env token if not provided)

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changedv4.0.0
    • removedInput schema / additionalProperties
      Removed value: -false
    • changedInput schema / properties / userCredentials / anyOf
      Previous value: -[
      -  {
      -    "additionalProperties": false,
      -    "properties": {
      -      "accessToken": {
      -        "minLength": 1,
      -        "type": "string"
      -      },
      -      "gitlabUrl": {
      -        "format": "uri",
      -        "type": "string"
      -      }
      -    },
      -    "type": "object"
      -  },
      -  {
      -    "type": "null"
      -  }
      -]New value: +[
      +  {
      +    "properties": {
      +      "accessToken": {
      +        "minLength": 1,
      +        "type": "string"
      +      },
      +      "gitlabUrl": {
      +        "format": "uri",
      +        "type": "string"
      +      }
      +    },
      +    "type": "object"
      +  },
      +  {
      +    "type": "null"
      +  }
      +]
  2. Changed1 schema field changedv1.15.0
    • changedInput schema / properties / userCredentials / description
      Previous value: -"Your GitLab credentials (optional - uses shared token if not provided)"New value: +"Your GitLab credentials (optional — falls back to the configured env token if not provided)"
  3. First observedv1.7.3

TDQS

B3.2/5.0
Behavior2/5

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

Annotations already declare readOnlyHint=true, idempotentHint=true and destructiveHint=false, so safety is covered. The description adds nothing beyond that: no disclosure of whether the listing is recursive or one level, whether it is paginated or capped, or how the credential fallback behaves — all behaviorally relevant for a browse call.

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?

A single short, front-loaded sentence with no redundancy — the resource and purpose come first. The trailing 'essential for' framing is mild filler and the brevity borders on under-specification rather than tight completeness.

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

Completeness3/5

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

With annotations covering the safety profile and the schema fully documented, the minimum is met. However, for a browse tool with no output schema, the description omits the shape of the result (file/folder entries) and depth/pagination behavior, which an agent needs to use the output correctly.

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

Parameters3/5

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

Schema description coverage is 100%; all four parameters (projectPath, path, ref, userCredentials) are documented in the schema, so the baseline is 3. The description adds no semantics beyond that, such as default root behavior or ref handling, so it cannot push higher.

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 ('Browse repository files and folders') and adds the intent ('exploring codebase structure'), so an agent knows it is a structural listing operation. It never distinguishes itself from siblings like get_file_content or resolve_path, which are natural alternatives for related tasks.

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?

The phrase 'essential for exploring codebase structure' implies the usage context but gives no explicit when-to-use rules. It does not say when to prefer this over get_file_content (for reading a file) or resolve_path (for locating a path), leaving routing to the agent's inference.

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