Skip to main content
Glama

list-users

Retrieve all users from your n8n instance. This tool is available exclusively for instance owners to manage user access and permissions.

Instructions

Retrieve all users from your instance. Only available for the instance owner.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
clientIdYes

Implementation Reference

  • Handler for the 'list-users' tool in the CallToolRequestSchema switch statement. Retrieves the N8nClient instance by clientId and calls listUsers() on it, returning the formatted user list or error.
    case "list-users": {
      const { clientId } = args as { clientId: string };
      const client = clients.get(clientId);
      if (!client) {
        return {
          content: [{
            type: "text",
            text: "Client not initialized. Please run init-n8n first.",
          }],
          isError: true
        };
      }
    
      try {
        const users = await client.listUsers();
        return {
          content: [{
            type: "text",
            text: JSON.stringify(users.data, null, 2),
          }]
        };
      } catch (error) {
        return {
          content: [{
            type: "text",
            text: error instanceof Error ? error.message : "Unknown error occurred",
          }],
          isError: true
        };
      }
  • src/index.ts:555-565 (registration)
    Registration of the 'list-users' tool in the ListToolsRequestSchema handler's tools array, defining name, description, and input schema.
    {
      name: "list-users",
      description: "Retrieve all users from your instance. Only available for the instance owner.",
      inputSchema: {
        type: "object",
        properties: {
          clientId: { type: "string" }
        },
        required: ["clientId"]
      }
    },
  • TypeScript interfaces defining the structure of N8nUser and N8nUserList for input/output validation in the list-users tool.
    interface N8nUser {
      id: string;
      email: string;
      firstName?: string;
      lastName?: string;
      isPending: boolean;
      role?: string;
      createdAt: string;
      updatedAt: string;
    }
    
    interface N8nUserList {
      data: N8nUser[];
      nextCursor?: string;
    }
  • N8nClient.listUsers() helper method that performs the API request to '/users' endpoint to fetch the list of users.
    async listUsers(): Promise<N8nUserList> {
      return this.makeRequest<N8nUserList>('/users');
    }
Behavior2/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 of behavioral disclosure. It mentions the ownership restriction, which is useful context, but fails to describe other critical behaviors: it doesn't specify whether this is a read-only operation (though 'Retrieve' implies it), what the return format looks like (e.g., list structure, pagination), or any rate limits or side effects. For a tool with no annotation coverage, this leaves significant gaps in understanding how it behaves.

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?

The description is extremely concise—two short sentences that directly convey the core purpose and a key constraint. Every word earns its place, with no redundant or vague language. It's front-loaded with the main action ('Retrieve all users'), making it easy to scan and understand quickly.

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?

Given the tool's complexity (a retrieval operation with access restrictions), lack of annotations, no output schema, and incomplete parameter documentation, the description is insufficient. It covers the 'what' and a usage limit but omits critical details: parameter semantics, return format, error handling, and behavioral traits like idempotency or side effects. For a tool in this context, more completeness is needed to guide effective use.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters2/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The input schema has 1 parameter ('clientId') with 0% description coverage, meaning the schema provides no semantic information. The description adds no details about this parameter—it doesn't explain what 'clientId' represents, how to obtain it, or its role in the retrieval process. With low schema coverage, the description fails to compensate, leaving the parameter's meaning unclear.

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 clearly states the verb ('Retrieve') and resource ('all users from your instance'), making the purpose specific and understandable. It doesn't explicitly distinguish from sibling tools like 'get-user' (singular) or 'create-users', but the scope ('all users') provides implicit differentiation. The description avoids tautology by adding meaningful detail beyond the tool name.

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 includes a usage constraint ('Only available for the instance owner'), which provides important context for when this tool can be used. However, it doesn't offer explicit guidance on when to choose this tool over alternatives like 'get-user' (for a single user) or 'create-users', nor does it mention any prerequisites beyond ownership. The guidance is implied rather than comprehensive.

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/illuminaresolutions/n8n-mcp-server'

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