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: []
    }

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv1.0.0

TDQS

B3.3/5.0
Behavior2/5

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

With no annotations, the description should provide behavioral details. It only mentions listing all realms but lacks info on read-only behavior, pagination, authentication, or response format.

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 extremely concise with a single sentence front-loading the purpose. No wasted words.

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?

For a simple list tool with no parameters or output schema, the description is minimally adequate but lacks details on return structure or any potential filters.

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?

The input schema has no parameters and schema description coverage is 100%, so the description adds no param semantics. Baseline of 3 is appropriate for a no-parameter tool.

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

Purpose5/5

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

The description 'List all available realms' clearly states the action (list) and resource (realms), with 'available' implying no filtering. It is distinct from sibling tools like create-user or list-users.

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 on when to use this tool or when alternatives might be better. The description gives no context for exclusions or prerequisites.

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

Deploy Server

Other Tools