Skip to main content
Glama
midPoint MCP Server

midPoint MCP Server

Assign role

assign_role

Assigns a role to a user only when the supplied OIDs match exact midPoint names; returns a dry-run preview if writes are disabled.

Instructions

Assign a role to a user. userName and roleName are the midPoint names (the unique name attribute, such as a login, not display names) of the objects the OIDs point to, as list and get results give them; the call is refused when they don't match, so the person confirming it reads the right names. Requires the write gate; otherwise a dry-run preview. When you write to a person, name people, roles and requests by their display names rather than OIDs.

Input Schema

NameRequiredDescriptionDefault
roleOidYesOID of the role
userOidYesOID of the user
roleNameYesthe role's midPoint name (its unique name attribute, not the display name); must match roleOid
userNameYesthe user's midPoint name (their login, not the full name); must match userOid

Output Schema

NameRequiredDescriptionDefault
bodyNothe JSON body of the midPoint REST request, when it has one
dryRunYes
methodYes
resultNo
appliedYes
summaryYes
endpointYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A3.7/5.0
Behavior4/5

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

With no annotations supplied, the description carries the full burden and does disclose real behavior: the call is refused when userName/roleName don't match the OIDs, and it degrades to a dry-run preview without the write gate. It stops short of describing idempotency (what happens if the user already holds the role) or any permission/rate constraints beyond the gate.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness3/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The action is front-loaded, but the middle sentence is a dense run-on ('as list and get results give them') and the closing sentence about naming people, roles and requests by display names is confusing here, since every parameter in this tool requires OIDs — it reads like guidance for a different call.

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?

All four parameters are documented in the schema and an output schema exists, so the description need not explain return values. Gating, validation and naming semantics are covered; the main gap is what a successful assignment implies (idempotency, effect on existing assignments).

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

Parameters4/5

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

Schema coverage is 100%, so the baseline is 3; the description earns above that by explaining that userName/roleName are midPoint unique-name attributes (a login, not a display name) and why the match check exists — it reads the right names back to the confirming operator. That rationale is not present in the schema.

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 first sentence is a precise verb+resource statement ('Assign a role to a user'), which distinguishes it from get_role, list_roles and the mutating siblings. It never explicitly contrasts with unassign_role or request_role, but the verb itself carries that distinction.

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 description gives preconditions (write gate required, otherwise dry-run preview) and a naming convention for the confirmation prompt, which implies when the tool is usable. It does not state when to prefer this over request_role (requesting a role for oneself) or unassign_role, so routing between the three role-mutating siblings is left to inference.

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