Skip to main content
Glama
Dynamics 365 MCP Server

Dynamics 365 MCP Server

by Kenny-666

manage_user_roles

Destructive

Preview, assign, or remove up to 20 direct user security roles in Dynamics 365, with dry-run checks, business unit resolution, and post-dispatch verification of each membership.

Instructions

Preview then assign or remove up to 20 direct user security roles. Resolves native relationship and business units, requires unprotected-write acknowledgement, and verifies each membership after dispatch. No automatic retries; effective privileges are not inferred.

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": {
      "user_id": "<user_id>",
      "role_ids": "<role_ids>",
      "action": "<action>"
    },
    "name": "manage_user_roles"
  }
}

Input Schema

NameRequiredDescriptionDefault
actionYes
dry_runNo
user_idYes
role_idsYes
expected_hashNo
environment_profileNoOptional named environment profile for this call; omit to use the configured default.
allow_unprotected_writeNo
allow_cross_business_unitNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv1.1.2

TDQS

A4.1/5.0
Behavior5/5

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

Beyond the destructive/idempotent hints, it discloses several non-obvious behaviors: native relationship and business-unit resolution, an unprotected-write acknowledgement gate, post-dispatch verification of each membership, no automatic retries, and that effective privileges are not inferred. That is exactly the operational context annotations cannot convey.

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 compact sentences, front-loaded with the operation and scope, then the workflow, then the failure/caveat behavior. No filler; every clause carries distinct operational 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?

For a destructive mutation with no output schema and eight parameters, the description covers safety gates, verification, retry behavior, and privilege-inference limits well. The main remaining gap is expected_hash, whose purpose (likely optimistic concurrency) an agent cannot guess from a bare regex pattern.

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?

With only 13% schema description coverage across 8 parameters, the description must carry the load. It meaningfully explains dry_run (preview), allow_unprotected_write (acknowledgement), and allow_cross_business_unit (business-unit resolution), but expected_hash is never mentioned and the action enum semantics remain implicit, leaving roughly half the surface undocumented.

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?

States a specific verb pair and resource ('assign or remove ... direct user security roles') with a bound ('up to 20'), which distinguishes it from role-definition siblings like change_role_privileges or change_privilege. It does not name a specific sibling or explicitly contrast with manage_security_role, so it falls 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 Guidelines4/5

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

The 'Preview then assign or remove' phrasing communicates the dry-run-first workflow, and the acknowledgement requirement signals a prerequisite gate. It gives no explicit when-not guidance or named alternative for adjacent tools (manage_security_role, change_role_privilege), so routing between siblings is still partly inferred.

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