Skip to main content
Glama

skycloak_create_application_role

Define a new role on a Keycloak application within a specified realm and cluster, creating the role for later assignment to users.

Instructions

Define a new role on an application. This creates the role itself; use skycloak_assign_application_role to grant it to a user.

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": {
      "cluster_id": "<cluster_id>",
      "realm": "<realm>",
      "client_id": "<client_id>",
      "name": "<name>"
    },
    "name": "skycloak_create_application_role"
  }
}

Input Schema

NameRequiredDescriptionDefault
nameYesthe role name
realmYesthe Keycloak realm name
client_idYesthe application's OAuth client ID
cluster_idYesthe cluster ID
descriptionNowhat the role is for

Output Schema

NameRequiredDescriptionDefault
idNo
nameYes
client_idYes
compositeYes
client_uuidNo
descriptionNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4/5.0
Behavior3/5

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

Annotations already declare readOnlyHint=false, destructiveHint=false and idempotentHint=false, so the mutation profile is known. The description adds one useful behavioral fact, that only the role object is created and no principal is bound to it, but says nothing about behavior when the role name already exists, permission requirements, or rollback.

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 no filler; the creation scope is stated first and the routing hint second, so the most important fact is front-loaded.

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?

With a fully documented schema, an output schema, and annotations covering the mutation profile, the definition supplies nearly everything an agent needs. The only meaningful omission is what happens on name collision or failure, which would matter for a non-idempotent create.

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 including 'description' are already documented in the schema. The description adds no syntax, format, or constraint detail beyond that, which is the expected baseline when the schema carries the load.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/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 ('Define a new role on an application') and explicitly separates the tool's effect from the grant operation, so an agent can distinguish it from skycloak_assign_application_role without opening either schema.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

It gives an explicit alternative and the condition that selects it: use skycloak_assign_application_role to grant the role to a user. It stops short of covering other nearby choices, such as application roles versus realm roles or when to update instead of create, so it is clear context without full exclusions.

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