Skip to main content
Glama
idoyudha

mcp-keycloak

by idoyudha

get_group

Retrieve a specific Keycloak group by its ID to manage identity and access permissions within a specified realm.

Instructions

Get a specific group by ID.

Args:
    group_id: Group ID
    realm: Target realm (uses default if not specified)

Returns:
    Group object

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
group_idYes
realmNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Implementation Reference

  • The 'get_group' tool handler, registered via @mcp.tool() decorator. Retrieves a specific group by its ID from the Keycloak server using the KeycloakClient.
    @mcp.tool()
    async def get_group(group_id: str, realm: Optional[str] = None) -> Dict[str, Any]:
        """
        Get a specific group by ID.
    
        Args:
            group_id: Group ID
            realm: Target realm (uses default if not specified)
    
        Returns:
            Group object
        """
        return await client._make_request("GET", f"/groups/{group_id}", realm=realm)
Behavior2/5

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

No annotations are provided, so the description carries the full burden of behavioral disclosure. It states the tool retrieves a group, implying a read-only operation, but doesn't cover permissions, error handling, rate limits, or what happens if the group doesn't exist. For a tool with no annotation coverage, this leaves significant behavioral gaps.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is appropriately sized and front-loaded, with the core purpose stated first in a single sentence. The 'Args' and 'Returns' sections are structured clearly, though the 'Returns' section could be more detailed. There's minimal waste, but it could be slightly more concise by integrating the parameter explanations into the main text.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the tool's low complexity (2 parameters, 1 required), the presence of an output schema (which handles return values), and no annotations, the description is mostly complete. It covers the purpose and parameters adequately, but lacks behavioral details like error cases or permissions. For a simple retrieval tool, this is sufficient but not exhaustive.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The description adds meaningful semantics beyond the input schema, which has 0% description coverage. It explains that 'group_id' identifies the group and 'realm' is the target realm with a default if unspecified. This clarifies parameter purposes and the optional nature of 'realm,' compensating well for the schema's lack of descriptions.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the tool's purpose: 'Get a specific group by ID.' It specifies the verb ('Get') and resource ('group'), and distinguishes it from siblings like 'list_groups' (which retrieves multiple groups) and 'get_group_members' (which focuses on group members). However, it doesn't explicitly contrast with all siblings, such as 'get_user_groups' (which gets groups for a user).

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 usage by stating 'Get a specific group by ID,' suggesting it's for retrieving a single, known group rather than listing all groups. It doesn't provide explicit when-not-to-use guidance or name alternatives, though the context of sibling tools like 'list_groups' offers some implicit differentiation. No prerequisites or exclusions are mentioned.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/idoyudha/mcp-keycloak'

If you have feedback or need assistance with the MCP directory API, please join our Discord server