Skip to main content
Glama
Keycloak MCP Server

Keycloak MCP Server

by Cayetano97

generate_example_id_token

Generate an example ID token to evaluate client scopes for a Keycloak client, letting you inspect the token's claims and audience before relying on the configuration.

Instructions

Generate an example ID token for evaluating client scopes.

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>",
      "client_uuid": "<client_uuid>"
    },
    "name": "generate_example_id_token"
  }
}

Input Schema

NameRequiredDescriptionDefault
realmYesRealm name
scopeNoScope to evaluate
userIdNoID of the user to evaluate for
audienceNoAudience for the generated token
client_uuidYesClient UUID

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv2.0.0

TDQS

C2.9/5.0
Behavior2/5

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

No annotations are supplied, so the description carries the full burden, and it discloses almost nothing about behavior. It does not say whether the returned token is signed, whether it is a throwaway/preview artifact or a real usable credential, whether generation requires specific admin permissions, or whether any server-side state is created.

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

Conciseness4/5

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

It is a single front-loaded sentence with no filler or redundancy. The size is appropriate, though the brevity comes at the cost of the missing guidance noted elsewhere.

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 five parameters, no annotations, no output schema, and several sibling generators, this definition is too thin. An agent cannot learn from it what the returned token looks like, whether it is consumable, or why it should choose this generator over generate_example_access_token.

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 five parameters (realm, client_uuid, scope, userId, audience) are already documented in the schema, which sets the baseline at 3. The description adds only a loose connection to 'client scopes' and does not explain interactions such as how audience or userId change the resulting token.

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: 'Generate an example ID token', which is unmistakably a token-minting operation. However, it does not distinguish itself from the near-identical sibling 'generate_example_access_token', so an agent must infer the ID-token-vs-access-token distinction 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?

The phrase 'for evaluating client scopes' hints at a use case but gives no explicit when-to-use rule and no exclusion against the closely related 'generate_example_access_token', 'generate_example_userinfo', or the SAML response generator. There is nothing telling an agent which of these generators to pick when it simply wants a token for a client.

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