Skip to main content
Glama
Keycloak MCP Server

Keycloak MCP Server

by Cayetano97

create_authz_scope

Creates an authorization scope in a Keycloak client’s resource server by specifying the realm, client UUID, and scope data.

Instructions

Create an authorization scope in a client's resource server.

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>",
      "scope_data": "<scope_data>"
    },
    "name": "create_authz_scope"
  }
}

Input Schema

NameRequiredDescriptionDefault
realmYesRealm name
scope_dataYesAuthorization scope representation
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?

With no annotations supplied, the description carries the full behavioral burden but only says it creates something. It does not disclose permission requirements, whether creation fails on duplicates, idempotency, or what is returned. For a mutation tool with zero annotation coverage this is a substantial gap.

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?

A single front-loaded sentence with no filler or repetition. It is efficient, though its brevity borders on under-specification rather than pure conciseness.

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?

The tool takes a nested object (scope_data) whose structure is only labeled 'Authorization scope representation', and the description does nothing to clarify what fields that object needs. Combined with no output schema and no annotations, an agent lacks what it needs to call this confidently.

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 realm, client_uuid, and scope_data are already documented in the schema. The description adds no extra meaning about formats, identifiers, or the shape of scope_data, so the baseline 3 applies.

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 gives a specific verb and resource ('Create an authorization scope') and scopes it to a client's resource server, which is enough to distinguish it from sibling tools like create_authz_permission or create_authz_policy. It stops short of explicitly contrasting itself with those siblings, so it is clear but not maximally differentiating.

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 guidance on when to use this tool versus create_client_scope, create_authz_resource, or update_authz_scope, and no stated prerequisites such as the client or resource server needing to exist first. The agent must infer all usage conditions 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.

Deploy Server

Other Tools