Skip to main content
Glama
Keycloak MCP Server

Keycloak MCP Server

by Cayetano97

list_organizations

Retrieves organizations in a Keycloak realm, with optional filters such as search text, custom attributes, identity provider, and pagination. Use it to browse or find organizations before managing their members or settings.

Instructions

List organizations for the realm, optionally filtered by search criteria. Requires Keycloak 25+.

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_organizations"
  }
}

Input Schema

NameRequiredDescriptionDefault
qNoA query to search for custom attributes, in the format 'key1:value2 key2:value2'
maxNoMaximum results to return
exactNoExact match for search
firstNoPagination offset
realmYesRealm name
searchNoSearch string filter
identityProviderNoThe alias of an identity provider, to only return the organizations linked to it. Cannot be combined with 'q'
briefRepresentationNoif false, return the full representation. Otherwise, only the basic fields are returned

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv2.0.0

TDQS

A3.5/5.0
Behavior3/5

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

No annotations are supplied, so the description carries the full disclosure burden. It does add a genuine behavioral constraint, 'Requires Keycloak 25+', which an agent cannot get from the schema, but it says nothing about permissions, pagination defaults, or whether the brief representation is the default.

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?

Two short sentences with zero waste, and the core purpose is front-loaded before the version caveat. Nothing could be trimmed without losing information.

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 an 8-parameter tool with no output schema and no annotations, the description is thin: it does not describe what a result entry contains or how the brief/full representation affects output. The version prerequisite partially compensates, but material gaps remain.

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 all eight parameters including the q/identityProvider mutual exclusion are already documented in structured data. The description only alludes to 'search criteria' generically and adds no syntax or format meaning beyond the schema; baseline 3 applies.

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 gives a clear verb+resource ('List organizations') and states the scope ('for the realm'), so an agent knows exactly what is returned. It does not distinguish itself from siblings such as list_member_organizations, list_user_organizations_by_member, or count_organizations, which is the only thing keeping it from a 5.

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?

'optionally filtered by search criteria' hints at the filtered-list use case, but there is no explicit guidance on when to pick this over count_organizations or the member/user-scoped organization listings. Usage is implied rather than stated.

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