Skip to main content
Glama

get-user

Retrieve user information from n8n workflows using ID or email address to access account details for workflow management and automation tasks.

Instructions

Get user by ID or email address.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
clientIdYes
idOrEmailYes

Implementation Reference

  • Handler for the 'get-user' tool: retrieves the specified user from the n8n instance using the N8nClient and returns the user data as formatted JSON.
    case "get-user": {
      const { clientId, idOrEmail } = args as { clientId: string; idOrEmail: 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 user = await client.getUser(idOrEmail);
        return {
          content: [{
            type: "text",
            text: JSON.stringify(user, null, 2),
          }]
        };
      } catch (error) {
        return {
          content: [{
            type: "text",
            text: error instanceof Error ? error.message : "Unknown error occurred",
          }],
          isError: true
        };
      }
    }
  • src/index.ts:591-602 (registration)
    Tool registration in the listTools response, including name, description, and input schema.
    {
      name: "get-user",
      description: "Get user by ID or email address.",
      inputSchema: {
        type: "object",
        properties: {
          clientId: { type: "string" },
          idOrEmail: { type: "string" }
        },
        required: ["clientId", "idOrEmail"]
      }
    },
  • N8nClient.getUser method: makes the API request to retrieve user data by ID or email.
    async getUser(idOrEmail: string): Promise<N8nUser> {
      return this.makeRequest<N8nUser>(`/users/${idOrEmail}`);
    }
  • TypeScript interface defining the structure of an N8n user object.
    interface N8nUser {
      id: string;
      email: string;
      firstName?: string;
      lastName?: string;
      isPending: boolean;
      role?: string;
      createdAt: string;
      updatedAt: string;
    }
Behavior2/5

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

No annotations are provided, so the description carries full burden. It states the tool retrieves a user but doesn't disclose behavioral traits like required permissions, error handling (e.g., if user not found), rate limits, or response format. This is a significant gap for a read operation with no annotation coverage.

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 a single, efficient sentence with zero waste. It's front-loaded and appropriately sized for a simple lookup tool, making it easy for an agent to parse 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 no annotations, 0% schema coverage, and no output schema, the description is incomplete. It lacks details on authentication, error cases, return values, and parameter meanings. For a tool with 2 required parameters and no structured documentation, this leaves the agent with insufficient context to use it effectively.

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?

Schema description coverage is 0%, so the description must compensate. It mentions 'ID or email address,' which partially explains 'idOrEmail' but doesn't clarify 'clientId' at all. With 2 parameters and no schema descriptions, the description adds minimal value beyond the parameter names, failing to fully compensate for the coverage gap.

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 tool's purpose: 'Get user by ID or email address.' It specifies the verb ('Get') and resource ('user'), and indicates the lookup mechanism. However, it doesn't explicitly differentiate from sibling tools like 'list-users' or 'delete-user', which would require a 5.

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?

The description provides no guidance on when to use this tool versus alternatives. It doesn't mention sibling tools like 'list-users' for multiple users or 'delete-user' for removal, nor does it specify prerequisites or exclusions. The agent must infer usage from the name alone.

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