Skip to main content
Glama

Assign a user to an environment

cs_admin_assign_user

Assign a security role to a user or application user in a specified environment, requiring explicit confirmation to apply changes to a live environment.

Instructions

Give a user (or an application user) a security role in an environment. Changes a live environment: requires confirm: true. Runs 'pac admin assign-user' with the active pac auth profile. Mutates a live environment: requires confirm: true (a dry run otherwise).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
cwdNoWorking directory for pac (for project commands: the solution project folder)
roleYesSecurity role name or id (cs_admin_list_security_roles)
userYesObject id or UPN, or the application id for an application user
confirmNoRequired to actually perform a change in a live environment. Without it the tool returns a dry run.
profileNopac auth profile to run as: the admin account for tenant commands. Defaults to CPS_ADMIN_PROFILE for admin commands and CPS_PAC_PROFILE otherwise, then the active profile. cs_init lists the profiles.
backgroundNoRun in the background and return a jobId immediately, for a command that takes longer than the client will wait. Poll cs_job_status.
environmentNoEnvironment id or URL
businessUnitNoBusiness unit id
timeoutSecondsNoDefault 600
applicationUserNoThe user is an application (service principal)

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.5

TDQS

B3.2/5.0
Behavior3/5

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

With no annotations provided, the description must disclose behavioral traits. It clearly states the tool changes a live environment and requires confirm: true to execute, and that without confirm it is a dry run. This is repeated for emphasis. However, it does not disclose other potential behaviors such as whether existing role assignments are overwritten, error handling, or side effects beyond the mutation. The core destructive nature is disclosed, but the description is minimal.

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 description is short (two sentences) but redundant: the confirm requirement is stated twice in almost identical terms. It also includes a note about the pac auth profile which, while useful, is not essential to the core action. The structure is acceptable but could be tightened by removing duplication.

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 is complex (10 parameters, mutation, no output schema, no annotations). The description covers the critical safety aspect (confirm requirement) but omits many details an agent might need: return format (no output schema), behavior on invalid user/role, interaction with environment parameter, and differentiation from bulk assignment. It is not fully adequate for a mutation tool of this complexity.

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 coverage is 100%, so the schema already documents all parameters. The description does not add any semantic detail beyond the schema; it only mentions 'user' and 'role' implicitly. It does not clarify parameter relationships, defaults, or specific formats beyond what the schema provides. Baseline 3 is appropriate.

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 states a clear action: 'Give a user (or an application user) a security role in an environment.' It specifies the resource (security role) and the target (user/application user) in an environment, and distinguishes itself from the sibling 'cs_admin_assign_users' by implying singular vs. bulk assignment. The mention of running 'pac admin assign-user' adds specificity.

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?

The description provides no guidance on when to use this tool versus alternatives like cs_admin_assign_users. It notes that it mutates a live environment and requires confirm, which is a caution but not a usage guideline. It does not mention any exclusions or conditions that would route an agent to a different tool.

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