Skip to main content
Glama

ninja_list_end_users

List end users from NinjaOne with pagination and optional organization filter. Access user data for account management and reporting.

Instructions

List all end users.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
pageSizeNoMax results to return
afterNoLast end user ID for pagination
organizationIdNoFilter by organization

Implementation Reference

  • The actual handler function for 'ninja_list_end_users'. It makes a GET request to '/user/end-users' via the NinjaOneClient, passing cleaned arguments (pageSize, after, organizationId) as query parameters.
    handler: async (args, client: NinjaOneClient) =>
      client.get('/user/end-users', clean(args)),
  • Input validation schema for the 'ninja_list_end_users' tool. Accepts optional pageSize, after (pagination cursor), and organizationId query parameters.
    inputSchema: {
      type: 'object',
      properties: {
        pageSize: { type: 'number', description: 'Max results to return' },
        after: { type: 'number', description: 'Last end user ID for pagination' },
        organizationId: { type: 'number', description: 'Filter by organization' },
      },
    },
  • Tool registration entry in the userTools array (lines 53-68). The tool is named 'ninja_list_end_users' with its schema and handler bundled together as a ToolDef object.
    {
      tool: {
        name: 'ninja_list_end_users',
        description: 'List all end users.',
        inputSchema: {
          type: 'object',
          properties: {
            pageSize: { type: 'number', description: 'Max results to return' },
            after: { type: 'number', description: 'Last end user ID for pagination' },
            organizationId: { type: 'number', description: 'Filter by organization' },
          },
        },
      },
      handler: async (args, client: NinjaOneClient) =>
        client.get('/user/end-users', clean(args)),
    },
  • The userTools array (containing ninja_list_end_users) is spread into the ALL_TOOLS array, which is then used to register all tools with the MCP server in src/index.ts.
    ...userTools,
  • src/index.ts:24-33 (registration)
    The MCP server maps all tool names to their handlers (line 24) and registers them via ListToolsRequestSchema (line 31-33). When 'ninja_list_end_users' is called, the handler from users.ts is invoked.
    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),
    }));
Behavior2/5

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

No annotations provided; description does not disclose pagination behavior, default sorting, or what happens when organizationId is omitted. Agent cannot infer behavior beyond 'list all'.

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

Conciseness3/5

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

At 4 words, it is concise but lacks structure. For a tool with 3 parameters, it could be more informative without being verbose. Front-loading is good, but opportunity to add value is missed.

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

Completeness2/5

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

No output schema, so description should clarify return format. Does not explain pagination, filtering effects, or how results are ordered. Given the presence of multiple sibling list tools, more context is needed.

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% with clear descriptions for each parameter. The tool description adds no additional meaning beyond the schema, so baseline score of 3 applies.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose3/5

Does the description clearly state what the tool does and how it differs from similar tools?

Description states 'List all end users' with clear verb and resource, but it fails to clarify that filtering by organizationId is possible, which contradicts 'all'. Also does not differentiate from sibling 'ninja_get_organization_end_users' which lists end users for a specific organization.

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?

No guidance on when to use this tool vs siblings like 'ninja_get_end_user' or 'ninja_get_organization_end_users'. No mention of pagination or filtering context despite having pageSize and after parameters.

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