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'); }

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