Skip to main content
Glama
Keycloak MCP Server

Keycloak MCP Server

by Cayetano97

list_groups

Retrieve and search all groups in a Keycloak realm with pagination, hierarchy options, and subgroup counts for administration.

Instructions

List all groups for the realm.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "realm": "<realm>"
    },
    "name": "list_groups"
  }
}

Input Schema

NameRequiredDescriptionDefault
qNoCustom query for searching groups
maxNoMaximum results size
exactNoIf true, search is exact match
firstNoPagination offset
realmYesRealm name
searchNoSearch string for group name
subGroupsCountNoBoolean which defines whether to return the count of subgroups for each group (default: true
populateHierarchyNoIf true, populate group hierarchy
briefRepresentationNoIf true, return brief representation

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv2.0.0

TDQS

C2.5/5.0
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 behavioral burden, yet it discloses nothing about result size limits, default pagination, whether subgroups are counted by default, or what permissions are needed. For a nine-parameter listing tool this is a substantial gap, though the sentence is at least not misleading.

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

Conciseness3/5

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

A single short sentence with no wasted words, and the scope is front-loaded. The terseness, however, reflects under-specification rather than disciplined editing.

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?

With nine parameters, no annotations, and no output schema, the description should explain search semantics, pagination behavior, and return shape. It says nothing beyond the one-line purpose, so an agent cannot predict result volume or hierarchy behavior from the definition.

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 100%, so every parameter including q, search, first, max, exact, and populateHierarchy is already documented in the schema. The description adds no extra meaning about how these interact (e.g., q versus search, or default page size), so the baseline 3 applies.

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 a specific verb and resource ("List all groups") and adds a scope ("for the realm"), so the basic operation is clear. However, it does not distinguish this tool from the many realm-scoped variants nearby (list_user_groups, list_organization_groups, list_client_role_groups), leaving the agent to infer the boundary from the name alone.

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?

There is no when-to-use guidance, no exclusion of alternative tools, and no statement of prerequisites or permissions. The agent must infer from the tool name whether this is the right list tool versus the other group-listing siblings.

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