Skip to main content
Glama

skycloak_assign_application_role

Idempotent

Assigns a Keycloak role to an application's service account, using role_client_id for client roles or omitting it for realm roles.

Instructions

Grant a role to an application's service account. Provide role_client_id for a client role, or omit it for a realm role.

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>",
      "role_name": "<role_name>"
    },
    "name": "skycloak_assign_application_role"
  }
}

Input Schema

NameRequiredDescriptionDefault
realmYesthe Keycloak realm name
client_idYesthe application client ID receiving the role
role_nameYesthe role name
cluster_idYesthe cluster ID
role_client_idNoclient ID owning the role for a client role; omit for a realm role

Output Schema

NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A3.6/5.0
Behavior3/5

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

Annotations already declare readOnlyHint=false, idempotentHint=true, destructiveHint=false and openWorldHint=false, so the safety profile needs no restating. The description contributes one piece of context the annotations lack: the grant targets the application's service account rather than a user. It says nothing about required permissions, behavior when the grant already exists, or failure modes.

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, and the core action is front-loaded before the conditional parameter note. Nothing could be removed without losing 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?

The tool is a simple five-parameter mutation with full schema coverage, rich annotations, and an output schema, so the description does not need to explain return values. It covers the action and the one ambiguous parameter; only the lack of alternative routing keeps it from a 5.

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 are already documented, including role_client_id as "client ID owning the role for a client role; omit for a realm role." The description's restatement of that same distinction adds no meaning beyond the schema, which places it at the baseline.

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 ("Grant a role to an application's service account"), which is materially more precise than the tool name alone and implicitly separates it from user-role assignment. It does not explicitly name a sibling such as skycloak_assign_realm_user_role to draw the boundary, so it stops short of a 5.

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?

The second sentence tells the agent how to choose between a client role and a realm role via role_client_id, which is useful conditional guidance. It gives no guidance on when to prefer this tool over the related user-role assignment or role-creation tools, and no stated prerequisites.

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