Skip to main content
Glama

list-realms

Retrieve all available realms from the Keycloak identity and access management server to manage authentication and authorization configurations.

Instructions

List all available realms

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • Handler implementation for the 'list-realms' tool. Fetches all realms from Keycloak using kcAdminClient.realms.find() and returns a formatted text list.
    case "list-realms": {
      const realms = await kcAdminClient.realms.find();
      
      return {
        content: [{
          type: "text",
          text: `Available realms:\n${realms.map(r => `- ${r.realm}`).join('\n')}`
        }]
      };
    }
  • src/index.ts:74-82 (registration)
    Registration of the 'list-realms' tool in the ListToolsRequestHandler response, defining name, description, and empty input schema.
    {
      name: "list-realms",
      description: "List all available realms",
      inputSchema: {
        type: "object",
        properties: {},
        required: []
      }
    },
  • Input schema for the 'list-realms' tool, which requires no parameters (empty object).
    inputSchema: {
      type: "object",
      properties: {},
      required: []
    }
Behavior2/5

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

With no annotations provided, the description carries full burden for behavioral disclosure. It states what the tool does ('list all available realms') but doesn't describe return format, pagination, permissions needed, or any side effects. For a tool with zero annotation coverage, this is insufficient to inform the agent about how the tool behaves beyond its basic function.

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

Conciseness5/5

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

The description is a single, efficient sentence that states the tool's purpose without any wasted words. It's appropriately sized for a simple list operation and front-loaded with the essential information. Every part of the description earns its place.

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

Completeness2/5

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

Given the lack of annotations and output schema, the description is incomplete. It doesn't explain what 'realms' are, what the return format looks like, or any behavioral traits. For a tool with no structured data to rely on, the description should provide more context to help the agent understand the tool fully.

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 tool has 0 parameters, and schema description coverage is 100% (though empty). The description doesn't need to compensate for missing parameter info. A baseline of 4 is appropriate since there are no parameters to document, and the description accurately reflects this by not mentioning any.

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 with a specific verb ('list') and resource ('realms'), making it immediately understandable. However, it doesn't differentiate from sibling tools like 'list-users', which could cause confusion about scope. It's not tautological or misleading, but lacks sibling distinction for a perfect score.

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?

The description provides no guidance on when to use this tool versus alternatives like 'list-users' or other siblings. There's no mention of prerequisites, context, or exclusions. While the purpose is clear, the absence of usage context leaves the agent without direction for tool selection.

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/ChristophEnglisch/keycloak-model-context-protocol'

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