gitlab_list_groups
Retrieve and manage GitLab groups by listing them based on ownership or search criteria using the GitLab MCP Server for streamlined group administration.
Instructions
List GitLab groups
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| owned | No | Limit to groups explicitly owned by the current user | |
| search | No | Search groups by name |
Implementation Reference
- The main handler function for gitlab_list_groups tool, which extracts parameters and calls the usersGroupsManager.listGroups method.
export const listGroups: ToolHandler = async (params, context) => { const { search, owned, min_access_level } = params.arguments || {}; const data = await context.usersGroupsManager.listGroups({ search: search as string | undefined, owned: owned as boolean | undefined, min_access_level: min_access_level as number | undefined }); return formatResponse(data); }; - src/utils/tools-data.ts:749-764 (schema)The tool schema definition including name, description, and inputSchema for gitlab_list_groups.
{ name: 'gitlab_list_groups', description: 'List GitLab groups', inputSchema: { type: 'object', properties: { search: { type: 'string', description: 'Search groups by name' }, owned: { type: 'boolean', description: 'Limit to groups explicitly owned by the current user' } } } - src/utils/tool-registry.ts:62-71 (registration)Registration of gitlab_list_groups to usersGroupsHandlers.listGroups within the tool registry object.
// Users and Groups tools gitlab_list_users: usersGroupsHandlers.listUsers, gitlab_get_user: usersGroupsHandlers.getUser, gitlab_list_groups: usersGroupsHandlers.listGroups, gitlab_get_group: usersGroupsHandlers.getGroup, gitlab_list_group_members: usersGroupsHandlers.listGroupMembers, gitlab_add_group_member: usersGroupsHandlers.addGroupMember, gitlab_list_project_members: usersGroupsHandlers.listProjectMembers, gitlab_add_project_member: usersGroupsHandlers.addProjectMember };