Skip to main content
Glama

grant_role

Read-only

Assign a ServiceNow role to a user by providing user identifier (sys_id, user_name, or email) and role name or sys_id. Resolves role assignment in sys_user_has_role.

Instructions

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

Input Schema

TableJSON 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

C2.6/5.0
Behavior1/5

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

Directly contradicts annotations: the description states 'Grant a role' which is a write operation, but annotations declare readOnlyHint=true. This is a serious inconsistency that misleads an agent about the tool's side effects. It also fails to disclose other behavioral aspects such as reversibility or permission requirements beyond the WRITE_ENABLED flag.

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?

A single concise sentence with no fluff. The prerequisite is mentioned upfront. However, the sentence is not front-loaded with the most critical information (the contradiction with annotations), and it could be restructured to lead with the action and table.

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

Completeness1/5

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

As a mutation tool with no annotations that match its behavior and no output schema, the description is severely incomplete. It does not describe success/error responses, impact on existing roles, or any side effects. The annotation contradiction alone makes it unreliable for an agent to call correctly.

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 covers 100% of parameters with descriptions, so baseline is 3. The description adds no parameter-specific information beyond what the schema already provides. It correctly implies that 'user' and 'role' are the target and subject, but this is already 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?

States a specific verb 'Grant' and resource 'role to a user', and identifies the underlying table sys_user_has_role. It differentiates from siblings like revoke_role and create_role by the action being performed. However, it could be more explicit about the relationship to list_user_roles.

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?

Provides no guidance on when to use this tool versus alternatives. The only contextual note is a prerequisite (WRITE_ENABLED=true), but it does not explain when to choose grant_role over revoke_role or create_role, nor any conditions for its use.

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