list_namespaces
Retrieve all GitLab namespaces accessible to your user account, with options to search by name, filter by ownership, and paginate results for efficient navigation.
Instructions
List all namespaces available to the current user
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| search | No | Search term for namespaces | |
| owned | No | Filter for namespaces owned by current user | |
| page | No | Page number for pagination (default: 1) | |
| per_page | No | Number of items per page (max: 100, default: 20) |
Implementation Reference
- schemas.ts:1074-1077 (schema)Input schema definition for the 'list_namespaces' tool, which validates parameters for listing GitLab namespaces including 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);
- schemas.ts:226-245 (schema)Output schema for GitLab namespaces, defining the structure of namespace objects returned by tools like list_namespaces.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(), });