Skip to main content
Glama
Keycloak MCP Server

Keycloak MCP Server

by Cayetano97

get_organization

Retrieves details of a Keycloak organization by its ID within a realm. Use it to look up organization data such as name and attributes via the Admin REST API (requires Keycloak 25+).

Instructions

Get an organization by ID. 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>",
      "org_id": "<org_id>"
    },
    "name": "get_organization"
  }
}

Input Schema

NameRequiredDescriptionDefault
realmYesRealm name
org_idYesOrganization ID

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 behavioral burden. It adds one genuinely useful piece of context - the Keycloak 25+ server requirement - and "get" reasonably implies a non-mutating read, but it says nothing about failure behavior for a missing org_id, required permissions, or whether realm must already exist.

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, zero filler, with the core action stated first and the version constraint appended. Nothing is redundant or buried.

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 two-parameter read with full schema coverage and no output schema, the definition is minimally sufficient - an agent can call it correctly. It is thin on the things the schema cannot express: what a successful response contains and how a not-found org is surfaced.

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 both realm and org_id are already documented in the input schema; the baseline of 3 applies. The phrase "by ID" reinforces that org_id is a direct identifier rather than a name or path, but the description adds nothing about the realm parameter's role as a namespace.

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?

"Get an organization by ID" names a specific verb (get) and resource (organization) plus the lookup key, which cleanly separates it from create_organization, delete_organization, and the list_organization_* family. It stops short of explicitly routing the agent away from get_organization_member or the group/idp siblings, so it is clear but not fully differentiated.

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?

Usage is only implied: an agent should call it when it already holds an organization ID and needs the single record. The "Requires Keycloak 25+" line is a prerequisite, not a when-to-use rule, and there is no guidance on what to do instead when the ID is unknown (e.g., list or search tools).

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