ninja_list_user_roles
Retrieve all user roles defined in NinjaOne to manage permissions and access controls.
Instructions
List all user roles defined in NinjaOne.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Implementation Reference
- src/tools/users.ts:84-91 (handler)The handler function for 'ninja_list_user_roles'. Makes a GET request to /user/roles on the NinjaOne API using the NinjaOneClient.
{ tool: { name: 'ninja_list_user_roles', description: 'List all user roles defined in NinjaOne.', inputSchema: { type: 'object', properties: {} }, }, handler: async (_args, client: NinjaOneClient) => client.get('/user/roles'), }, - src/tools/users.ts:85-89 (schema)The input schema for 'ninja_list_user_roles'. No parameters required (empty properties).
tool: { name: 'ninja_list_user_roles', description: 'List all user roles defined in NinjaOne.', inputSchema: { type: 'object', properties: {} }, }, - src/tools/users.ts:84-84 (registration)Tool definition object registered in the userTools array, exported from src/tools/users.ts.
{ - src/tools/index.ts:9-13 (helper)ALL_TOOLS aggregates all tool arrays including userTools which contains ninja_list_user_roles.
import { ticketingTools } from './ticketing.js'; import { userTools } from './users.js'; export type { ToolDef } from './types.js'; export const ALL_TOOLS = [ - src/index.ts:24-24 (helper)The toolMap built from ALL_TOOLS associates the tool name to its handler. At runtime, CallToolRequestSchema dispatches to the correct handler via this map.
const toolMap = new Map(ALL_TOOLS.map((def) => [def.tool.name, def.handler]));