Skip to main content
Glama

sn_assign_roles

Assign or revoke ServiceNow roles to users or groups, and list assigned roles.

Instructions

Assign or revoke roles on a ServiceNow user or group.

target_type: user — Roles go on the individual user (sys_user_has_role) group — Roles go on the group; all members inherit them (sys_group_has_role)

action: assign — Grant the role(s) revoke — Remove the role(s) list — Show current roles

Examples: target_type="user" target="john.doe" action="assign" roles=["itil","catalog"] target_type="group" target="Network Ops" action="assign" roles=["itil","sn_incident_write"] target_type="user" target="jane.smith" action="list"

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
target_typeYes
targetYesUsername/email/sys_id for user, or group name/sys_id for group
actionYes
rolesNoRole names (required for assign/revoke)
Behavior4/5

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

Without annotations, the description carries the burden. It discloses that roles for 'user' go on sys_user_has_role and for 'group' on sys_group_has_role with inheritance. Missing details on permissions or reversibility but sufficient for core behavior.

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?

The description is concise and well-structured, with clear parameter explanations and examples. Every sentence adds value without unnecessary verbosity.

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 tool has 4 parameters (3 required), no output schema. The description fully explains all parameters, actions, and target types with examples, covering the necessary context for correct invocation.

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 50% (only target and roles have descriptions). The description compensates by explaining target_type and action in detail, including what each enumeration does, and provides examples.

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 clearly states the tool's purpose: 'Assign or revoke roles on a ServiceNow user or group.' It distinguishes from sibling tools like sn_list_roles by focusing on assign/revoke actions.

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 description explains when to use user vs group target and the three actions (assign, revoke, list). It provides examples but doesn't explicitly state when not to use this tool or compare with alternatives.

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/pinnintisagarSB/ServiceNow-Dev-MCP'

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