gitlab_get_group
Retrieve complete metadata, settings, and statistics for a GitLab group. Include the first page of projects in the group by setting with_projects=true. Use this tool to verify configurations, gather detailed group insights, and count associated projects.
Instructions
Get detailed group information Returns: Complete group metadata, settings, statistics Use when: Need full group details, checking configuration, counting projects Optional: Include first page of projects with with_projects=true
Example response: { "id": 123, "name": "My Group", "full_path": "parent-group/my-group", "description": "Group for team projects", "visibility": "private", "projects_count": 15, "created_at": "2023-01-01T00:00:00Z", "web_url": "https://gitlab.com/groups/my-group" }
Related tools:
gitlab_list_groups: Browse available groups
gitlab_list_group_projects: List all projects in group
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| group_id | Yes | Group identifier Type: integer OR string Format: numeric ID or 'group/subgroup' path Required: Yes Examples: - 456 (numeric ID) - 'my-group' (group path) - 'parent-group/sub-group' (nested group path) | |
| with_projects | No | Include projects in group response Type: boolean Default: false Options: - true: Include first page of projects - false: Only group metadata Note: Adds project list to response (limited to first 20) |
Implementation Reference
- src/mcp_gitlab/tool_handlers.py:601-607 (handler)Handler function that implements the core logic for the gitlab_get_group tool by extracting the group_id parameter and calling GitLabClient.get_group() with optional with_projects flag.def handle_get_group(client: GitLabClient, arguments: Optional[Dict[str, Any]]) -> Dict[str, Any]: """Handle getting single group""" group_id = require_argument(arguments, "group_id") with_projects = get_argument(arguments, "with_projects", False) return client.get_group(group_id, with_projects=with_projects)
- MCP tool schema definition specifying input validation for group_id (required string) and optional with_projects boolean.types.Tool( name=TOOL_GET_GROUP, description=desc.DESC_GET_GROUP, inputSchema={ "type": "object", "properties": { "group_id": {"type": "string", "description": desc.DESC_GROUP_ID}, "with_projects": {"type": "boolean", "description": desc.DESC_WITH_PROJECTS, "default": False} }, "required": ["group_id"] } ),
- src/mcp_gitlab/tool_handlers.py:1028-1028 (registration)Maps the tool name TOOL_GET_GROUP to its handler function in the TOOL_HANDLERS dictionary, which is used by server.py to dispatch calls.TOOL_GET_GROUP: handle_get_group,
- src/mcp_gitlab/constants.py:201-201 (helper)Constant defining the exact tool name string used across the codebase for gitlab_get_group.TOOL_GET_GROUP = "gitlab_get_group"