Skip to main content
Glama
idoyudha

mcp-keycloak

by idoyudha

get_client_secret

Retrieve the client secret for authentication in Keycloak by specifying the client ID and optional realm.

Instructions

Get the client secret.

Args:
    id: The client's database ID
    realm: Target realm (uses default if not specified)

Returns:
    Client secret object

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
idYes
realmNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Implementation Reference

  • The async handler function for the 'get_client_secret' MCP tool. It is decorated with @mcp.tool(), which handles registration and schema inference. The function retrieves the client secret from the Keycloak API using the KeycloakClient instance.
    @mcp.tool()
    async def get_client_secret(id: str, realm: Optional[str] = None) -> Dict[str, str]:
        """
        Get the client secret.
    
        Args:
            id: The client's database ID
            realm: Target realm (uses default if not specified)
    
        Returns:
            Client secret object
        """
        return await client._make_request(
            "GET", f"/clients/{id}/client-secret", 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 full burden. It states this is a 'Get' operation which implies read-only behavior, but doesn't disclose security implications (accessing sensitive secrets), authentication requirements, rate limits, or what happens if the client doesn't exist. For a tool that retrieves sensitive credentials, this is a significant transparency gap.

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 brief with clear sections (Args, Returns). Each sentence serves a purpose: stating the action, explaining parameters, and describing the return. However, the core description 'Get the client secret' is overly terse and could benefit from more context about what this operation entails.

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

Completeness3/5

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

Given 2 parameters with 0% schema coverage and an output schema exists, the description provides basic parameter semantics and return indication. However, for a tool that accesses sensitive secrets with no annotations, it should explain security implications, authentication needs, and error conditions more thoroughly. The existence of an output schema reduces the need to describe return values, but behavioral context is insufficient.

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

Parameters3/5

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

Schema description coverage is 0%, so the description must compensate. It provides basic semantic meaning for both parameters ('id: The client's database ID' and 'realm: Target realm (uses default if not specified)'), which adds value beyond the bare schema. However, it doesn't explain format expectations, realm implications, or what 'default' means in context. Baseline would be lower without this param info.

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

Purpose3/5

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

The description states the tool 'Get the client secret' which is a clear verb+resource combination, but it doesn't differentiate from sibling tools like 'regenerate_client_secret' or explain what a 'client secret' is in this context. The purpose is understandable but lacks specificity about the resource being retrieved.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

No guidance is provided about when to use this tool versus alternatives. The description doesn't mention prerequisites, when this tool is appropriate versus 'get_client' or 'regenerate_client_secret', or any context about authentication requirements. The agent must infer usage from the name alone.

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