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

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

C2.8/5.0
Behavior2/5

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

With no annotations provided, the description carries the full burden of behavioral disclosure. It states it 'Get[s] user' but doesn't clarify if this is a read-only operation, what permissions are required, whether it returns partial or full user data, or error handling (e.g., for invalid IDs). The description lacks critical behavioral traits like safety, response format, or rate limits, leaving significant gaps for an agent.

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 with a single sentence ('Get user by ID or email address.') that front-loads the core purpose. Every word earns its place, avoiding redundancy or fluff, making it efficient for quick comprehension by an agent.

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 moderate complexity (2 required parameters), no annotations, and no output schema, the description is incomplete. It doesn't cover behavioral aspects like read/write nature, error cases, or return values, and parameter guidance is insufficient. For a user retrieval tool in a system with multiple user-related operations, more context is needed to ensure correct agent usage.

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 but adds minimal value. It mentions 'ID or email address', which loosely relates to 'idOrEmail', but doesn't explain the 'clientId' parameter at all or provide format details (e.g., email syntax, ID constraints). With 2 undocumented parameters, the description fails to adequately clarify their semantics beyond a vague hint.

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 ('Get') and resource ('user'), specifying it can be retrieved by 'ID or email address'. It distinguishes from siblings like 'list-users' (which retrieves multiple users) by focusing on single-user lookup. However, it doesn't explicitly contrast with 'delete-user' or 'create-users', leaving some sibling differentiation incomplete.

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 when to prefer 'get-user' over 'list-users' for single-user queries, nor does it address prerequisites like authentication or context for using 'idOrEmail' versus 'clientId'. There's no explicit when/when-not or alternative tool references.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.