Skip to main content
Glama
mrz1880

mcp-keycloak-admin

Assign a default scope to a client

keycloak_client_scope_assign
Idempotent

Assign an existing realm client scope to a client as a default scope. Idempotent write operation returns confirmation or reason if not assigned.

Instructions

Assigns an existing realm client scope to a client as a default scope. This is a write operation; it is idempotent, so re-assigning an already-assigned scope leaves the client unchanged. Use keycloak_client_scopes_list to find a valid scope name and keycloak_client_default_scopes_get to check current assignments before calling this. Returns a confirmation message when the scope is assigned, or a message starting with "Not assigned:" with the reason (for example when the client or scope does not exist).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
scopeYesThe name of an existing realm client scope to assign as a default scope, for example "profile" or "email". Must match a scope returned by keycloak_client_scopes_list. Required.
clientIdYesThe internal Keycloak UUID of the client (the "id" field, not the human-readable clientId), for example "a1b2c3d4-5678-90ab-cdef-1234567890ab". Required.
Behavior5/5

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

The description discloses that this is a write operation with idempotent behavior, aligning with the 'idempotentHint' annotation. It also details the return format: a confirmation message or a 'Not assigned:' message with reason. No contradictions with annotations.

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?

Three concise sentences: first states purpose, second adds behavioral traits (idempotent, return type), third gives usage guidance. Every sentence adds value, no redundancy.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

The description fully covers the tool's behavior, prerequisites, and edge cases (non-existent client/scope). It references sibling tools for preparatory steps, making it self-contained for AI decision-making.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters5/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

With 100% schema coverage, the description adds crucial context: clarifies that clientId is the internal UUID (not the human-readable clientId) and provides examples for scope ('profile', 'email'). This reduces ambiguity beyond the schema.

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 specifies the verb 'assign' and the resource 'existing realm client scope to a client as a default scope'. It clearly distinguishes itself from sibling tools like keycloak_client_default_scopes_get (which checks assignments) and keycloak_client_scopes_list (which lists available scopes).

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

Usage Guidelines5/5

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

The description provides explicit guidance: 'Use keycloak_client_scopes_list to find a valid scope name and keycloak_client_default_scopes_get to check current assignments before calling this.' This tells the agent what to do before invoking the tool, including alternative tools for context.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/mrz1880/mcp-keycloak-admin'

If you have feedback or need assistance with the MCP directory API, please join our Discord server