Skip to main content
Glama
mcp-keycloak

mcp-keycloak

by idoyudha

create_client_role

Create a new Keycloak client role with a name and optional description, composite setting, and target realm.

Instructions

Create a new client role.

Args:
    client_id: Client database ID
    name: Role name
    description: Role description
    composite: Whether this is a composite role
    realm: Target realm (uses default if not specified)

Returns:
    Status message

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": {
      "client_id": "<client_id>",
      "name": "<name>"
    },
    "name": "create_client_role"
  }
}

Input Schema

NameRequiredDescriptionDefault
nameYes
realmNo
client_idYes
compositeNo
descriptionNo

Output Schema

NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed4 schema fields changedv1.3.0
    • addedOutput schema / additionalProperties
      Added value: +{
      +  "type": "string"
      +}
    • removedOutput schema / properties
      Removed value: -{
      -  "result": {
      -    "additionalProperties": {
      -      "type": "string"
      -    },
      -    "title": "Result",
      -    "type": "object"
      -  }
      -}
    • removedOutput schema / required
      Removed value: -[
      -  "result"
      -]
    • changedOutput schema / title
      Previous value: -"create_client_roleOutput"New value: +"create_client_roleDictOutput"
  2. First observed

TDQS

C2.9/5.0
Behavior2/5

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

With no annotations supplied, the description carries the full behavioral burden and falls short: it does not say whether creation fails if the role name already exists, whether the operation is idempotent, what permissions are required, or what happens on a nonexistent client_id. The only real behavioral detail is 'realm: uses default if not specified', which is useful but thin for a write operation.

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?

Front-loaded one-line purpose followed by a compact args list and return note; no wasted prose. The 'Returns: Status message' line is mildly redundant since an output schema exists, and several arg glosses are tautological, but the structure is efficient overall.

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?

Because an output schema exists, the description needn't explain return values, and it covers all parameters. What is missing is the mutation-specific context an agent needs with zero annotations: failure modes, permission requirements, and sibling differentiation against create_realm_role.

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 0%, so the Args block is the only source of parameter meaning, and it does cover all five parameters including the realm default and the meaning of 'composite'. But entries like 'name: Role name' and 'description: Role description' merely restate the parameter names and add no constraints, formats, or valid-value information.

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?

States a specific verb and resource ('Create a new client role'), which is clear enough to act on. However, it does nothing to distinguish itself from the sibling create_realm_role, and the client-vs-realm scope distinction is the single most important disambiguator here.

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 mention of when to prefer create_realm_role instead, and no stated prerequisites such as the target client already existing or the caller needing role-management permission. The agent must infer all routing from the name alone.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.