Skip to main content
Glama

grant_role

Grants a specified role to a ServiceNow user by user ID, username, or email, assigning it through the sys_user_has_role record. Use it to provision access or grant users the permissions they need.

Instructions

Grant a role to a user (sys_user_has_role). Requires WRITE_ENABLED=true

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": "<user>",
      "role": "<role>"
    },
    "name": "grant_role"
  }
}

Input Schema

NameRequiredDescriptionDefault
roleYesRole sys_id or name (e.g. "itil")
userYesUser sys_id, user_name, or email

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv4.15.1

TDQS

B3.4/5.0
Behavior3/5

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

Annotations already declare readOnlyHint=false, idempotentHint=false, and destructiveHint=false, so the safety profile is covered. The description adds the WRITE_ENABLED prerequisite, which is genuinely useful operational context, but it does not explain the consequence of the non-idempotent flag (e.g. whether re-granting errors or duplicates) or what a successful response contains.

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

Conciseness4/5

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

Two short sentences, front-loaded with the action and followed by the precondition; nothing is padded. It is terse to the point of leaving gaps, but no sentence is wasted.

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

Completeness3/5

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

For a two-parameter mutation with annotations and a fully documented schema, the core is covered and no output schema is needed. Still missing are the behavior on an already-assigned role and any permission/scope caveats, which matter for a non-idempotent write.

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% and both parameters carry their own descriptions (sys_id/name for role, sys_id/user_name/email for user), so the schema does the heavy lifting. The description adds no format or constraint detail beyond the table name hint, which is the expected baseline when the schema is complete.

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 description gives a specific verb plus resource ('Grant a role to a user') and names the underlying table (sys_user_has_role), so the operation is unambiguous. The grant/revoke pairing with the sibling revoke_role is inferable from the verb, though the sibling is never named explicitly.

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?

It states one real precondition ('Requires WRITE_ENABLED=true'), which tells the agent when the call will fail. However, there is no guidance on when to use this versus create_role, no note on what to do if the user already holds the role, and no exclusions.

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