Skip to main content
Glama
GitLab MCP Server

GitLab MCP Server

by ttpears

Custom REST Read

execute_rest_read
Read-onlyIdempotent

Send arbitrary GET requests to the GitLab REST API /api/v4 to read endpoints without a dedicated tool, such as repository files, test reports, or admin paths.

Instructions

Execute an arbitrary GET request against the GitLab REST API at /api/v4. Open-ended escape hatch for read endpoints not covered by a dedicated tool — e.g. /projects/:id/repository/files, /projects/:id/pipelines/:pipeline_id/test_report, /admin/*. Provide the path beginning with "/" (no host, no /api/v4 prefix) and an optional query object. For writes, use execute_rest_write.

Input Schema

NameRequiredDescriptionDefault
pathYesPath under /api/v4, beginning with "/" (e.g. "/projects/42/issues" or "/projects/foo%2Fbar/repository/commits/HEAD"). Must not include host, "/api/v4" prefix, or "?" query string.
queryNoQuery string parameters (e.g. { state: "opened", per_page: 20 }). Values are coerced to strings.
userCredentialsNoYour GitLab credentials (optional — falls back to the configured env token if not provided)

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed3 schema fields changedv4.0.0
    • removedInput schema / additionalProperties
      Removed value: -false
    • addedInput schema / properties / query / propertyNames
      Added value: +{
      +  "type": "string"
      +}
    • 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. Addedv1.19.0

TDQS

A4.4/5.0
Behavior4/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 the safety profile is covered. The description adds useful behavioral context by calling this an arbitrary GET escape hatch and specifying that the path must omit host and /api/v4 prefix, though it does not discuss rate limits or response shape.

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

Conciseness5/5

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

The description is three tight sentences with the core purpose front-loaded, followed by path/query instructions and the write-tool alternative. Every sentence contributes directly to correct invocation.

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

Completeness4/5

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

For a generic REST escape hatch with no output schema, the description covers purpose, path format, query usage, and the write alternative. It does not explain authentication fallback or response format, but those are either schema-documented or inherently endpoint-dependent.

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%, so the schema already documents path, query, and userCredentials in detail. The description reinforces the path format and optional query object but does not add meaning beyond what the schema provides, making the baseline 3 appropriate.

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 states a specific verb and resource: execute an arbitrary GET request against the GitLab REST API at /api/v4. It explicitly frames the tool as an open-ended escape hatch for read endpoints not covered by dedicated tools, which distinguishes it from the many specific get_* siblings and from execute_rest_write.

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?

It gives clear when-to-use guidance: read endpoints not covered by a dedicated tool, with concrete examples such as repository files, pipeline test reports, and /admin/*. It also names the alternative for writes, execute_rest_write, so the agent knows when not to use this tool.

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