Skip to main content
Glama

ninja_list_users

Fetch a list of users from NinjaOne, optionally filtered by technician or end-user role.

Instructions

List all users in NinjaOne. Optionally filter by user type (TECHNICIAN or END_USER).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
userTypeNoFilter by user type

Implementation Reference

  • Handler function that makes GET /users API call with optional filters (userType) after cleaning null/empty args.
      handler: async (args, client: NinjaOneClient) => client.get('/users', clean(args)),
    },
  • Input schema for ninja_list_users: optional userType enum (TECHNICIAN or END_USER).
      inputSchema: {
        type: 'object',
        properties: {
          userType: {
            type: 'string',
            enum: ['TECHNICIAN', 'END_USER'],
            description: 'Filter by user type',
          },
        },
      },
    },
  • Tool is defined as a ToolDef entry in the userTools array exported from src/tools/users.ts.
    export const userTools: ToolDef[] = [
      {
        tool: {
          name: 'ninja_list_users',
          description: 'List all users in NinjaOne. Optionally filter by user type (TECHNICIAN or END_USER).',
          inputSchema: {
            type: 'object',
            properties: {
              userType: {
                type: 'string',
                enum: ['TECHNICIAN', 'END_USER'],
                description: 'Filter by user type',
              },
            },
          },
        },
        handler: async (args, client: NinjaOneClient) => client.get('/users', clean(args)),
      },
      {
        tool: {
  • userTools (containing ninja_list_users) is aggregated into ALL_TOOLS array in src/tools/index.ts.
    export const ALL_TOOLS = [
      ...deviceTools,
      ...organizationTools,
      ...alertTools,
      ...activityTools,
      ...ticketingTools,
      ...queryTools,
      ...policyTools,
      ...userTools,
      ...backupTools,
      ...systemTools,
    ];
  • src/index.ts:24-60 (registration)
    MCP server registration in src/index.ts: tools are listed via ListToolsRequestSchema and dispatched via CallToolRequestSchema using toolMap.
    const toolMap = new Map(ALL_TOOLS.map((def) => [def.tool.name, def.handler]));
    
    const server = new Server(
      { name: 'ninjaone-mcp', version: '1.0.0' },
      { capabilities: { tools: {} } },
    );
    
    server.setRequestHandler(ListToolsRequestSchema, async () => ({
      tools: ALL_TOOLS.map((def) => def.tool),
    }));
    
    server.setRequestHandler(CallToolRequestSchema, async (request) => {
      const { name, arguments: args } = request.params;
      const handler = toolMap.get(name);
    
      if (!handler) {
        return {
          content: [{ type: 'text', text: `Unknown tool: ${name}` }],
          isError: true,
        };
      }
    
      try {
        const result = await handler(
          (args ?? {}) as Record<string, unknown>,
          ninjaClient,
        );
        return {
          content: [{ type: 'text', text: JSON.stringify(result, null, 2) }],
        };
      } catch (err) {
        return {
          content: [{ type: 'text', text: err instanceof Error ? err.message : String(err) }],
          isError: true,
        };
      }
    });
Behavior3/5

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

No annotations are provided, so the description carries the full burden. It accurately describes a read-only operation without side effects, but does not delve into potential behaviors beyond listing and filtering.

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?

Two concise sentences, front-loaded with the main purpose and a secondary detail. No unnecessary words or repetition.

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

Completeness4/5

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

For a simple list tool with one optional parameter and no output schema, the description is adequate. It covers the action and the filter. The return format is not described, but is generally implied for list operations.

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%. The description restates the filter parameter and enumerates valid values, adding no new information beyond the schema's own description and enum.

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 verb 'list' and the resource 'users', with optional filtering by user type. It distinguishes itself from sibling tools like ninja_list_technicians and ninja_list_end_users by indicating it lists all users.

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?

The description implies usage for listing users with optional filtering, but does not explicitly guide when to use this tool versus the more specific sibling tools like ninja_list_technicians or ninja_list_end_users.

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/Allied-Business-Solutions/ninjaone-mcp'

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