Skip to main content
Glama
harshmaur

GitLab MCP Server

by harshmaur

list_namespaces

Retrieve all GitLab namespaces accessible to your account, with options to search, filter by ownership, and paginate results.

Instructions

List all namespaces available to the current user

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
searchNoSearch term for namespaces
ownedNoFilter for namespaces owned by current user
pageNoPage number for pagination (default: 1)
per_pageNoNumber of items per page (max: 100, default: 20)

Implementation Reference

  • Input schema for the 'list_namespaces' tool, defining parameters like search term and owned filter, merged with pagination options.
    export const ListNamespacesSchema = z.object({
      search: z.string().optional().describe("Search term for namespaces"),
      owned: z.boolean().optional().describe("Filter for namespaces owned by current user"),
    }).merge(PaginationOptionsSchema);
  • Response schema defining the structure of a GitLab namespace object, likely used as output for list_namespaces tool.
    export const GitLabNamespaceSchema = z.object({
      id: z.number(),
      name: z.string(),
      path: z.string(),
      kind: z.enum(["user", "group"]),
      full_path: z.string(),
      parent_id: z.number().nullable(),
      avatar_url: z.string().nullable(),
      web_url: z.string(),
      members_count_with_descendants: z.number().optional(),
      billable_members_count: z.number().optional(),
      max_seats_used: z.number().optional(),
      seats_in_use: z.number().optional(),
      plan: z.string().optional(),
      end_date: z.string().nullable().optional(),
      trial_ends_on: z.string().nullable().optional(),
      trial: z.boolean().optional(),
      root_repository_size: z.number().optional(),
      projects_count: z.number().optional(),
    });

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changedv1.0.0
    • addedInput schema / additionalProperties
      Added value: +false
  2. First observed

TDQS

B3.4/5.0
Behavior2/5

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

With no annotations, the description carries the full burden of behavioral disclosure. It only reveals the current-user scope; it does not disclose read-only behavior, pagination semantics, filtering behavior, or how results are returned. A list operation is implicitly non-destructive, but the description offers minimal behavioral detail beyond that.

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 a single, front-loaded sentence with no filler. Every word contributes to the core meaning, making it highly scannable and easy to parse for an AI agent.

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?

Given no annotations and no output schema, the description leaves important gaps: it does not explain pagination behavior, the shape of returned namespace objects, or how search/owned filters affect results. The schema documents parameters, but the description alone is too sparse for an agent to fully understand the tool's runtime behavior.

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 parameters (page, owned, search, per_page) are already fully documented in the schema. The description adds no extra meaning about these parameters, such as how filtering or pagination interact, so the baseline score of 3 is 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 (List), a resource (namespaces), and a clear scope (available to the current user). This clearly distinguishes it from siblings like get_namespace (single namespace) and verify_namespace (validation), so an agent can identify the right tool.

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 description implies when to use it: when you need all namespaces accessible to the current user. However, it does not explicitly mention alternatives like get_namespace for retrieving a single namespace, nor does it provide exclusion criteria. The usage context is clear but routing guidance to other tools is absent.

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