gitlab_get_group
Retrieve detailed group information from GitLab including metadata, settings, statistics, and optionally the first page of 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)The main handler function that implements the gitlab_get_group tool logic. Extracts group_id (required) and with_projects (optional) from arguments, then calls the GitLabClient.get_group method.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)
- The input schema definition for the gitlab_get_group tool, specifying required group_id (string) and optional with_projects (boolean). Used for tool validation and documentation.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)Registration of the handle_get_group function to the TOOL_GET_GROUP ("gitlab_get_group") tool name in the TOOL_HANDLERS dictionary, which is used by server.py to dispatch tool calls.TOOL_GET_GROUP: handle_get_group,
- src/mcp_gitlab/constants.py:201-201 (registration)Constant definition mapping the tool name string "gitlab_get_group" to TOOL_GET_GROUP, used consistently across handler registration, schema definitions, and server imports.TOOL_GET_GROUP = "gitlab_get_group"