Skip to main content
Glama
Keycloak MCP Server

Keycloak MCP Server

by Cayetano97

count_organization_members

Returns the number of members in a Keycloak organization using the realm name and organization ID; requires Keycloak 26.0 or later.

Instructions

Returns number of members in the organization. Requires Keycloak 26.0+.

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": "count_organization_members"
  }
}

Input Schema

NameRequiredDescriptionDefault
realmYesRealm name
org_idYesOrganization ID

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv2.0.0

TDQS

A3.6/5.0
Behavior3/5

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

With no annotations supplied, the description carries the full burden; it does establish that this is a read-style count and adds a real environmental constraint (Keycloak 26.0+), which is value beyond the schema. However, it does not say whether the count covers only direct organization members or includes members inherited via groups, nor whether the count is affected by pagination or filtering, which matter for interpreting the result.

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, front-loaded with the core behavior and followed by the version prerequisite. There is no filler or redundancy, and every sentence carries information.

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

Completeness4/5

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

For a low-complexity two-parameter counting tool with no output schema, the definition covers purpose, required inputs (via schema), and an environment prerequisite. The only meaningful gap is the exact semantics of what is being counted, which would matter for a tool that returns a bare number.

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%, with both required parameters ('realm', 'org_id') documented in the schema itself, so the baseline of 3 applies. The description adds no meaning beyond the schema — nothing about scope of org_id (organization ID vs alias) or realm qualification (e.g., whether realm must match the org).

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 states a specific verb-and-resource pair ('Returns number of members in the organization'), which is clearly distinct from sibling list_organization_members since it returns a count rather than a collection. It stops short of explicitly naming that sibling as the alternative, 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: the reader infers 'use this when you need a total rather than the member list.' The 'Requires Keycloak 26.0+' sentence is genuinely useful prerequisite context that constrains when the call can succeed, but there is no explicit when/when-not guidance or named alternative.

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