Skip to main content
Glama

get-user

Retrieve user details by ID or email address for MCP- N8N. Streamline user data access with specific query parameters for efficient management.

Instructions

Get user by ID or email address.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
clientIdYes
idOrEmailYes

Implementation Reference

  • MCP tool handler for 'get-user': validates client, calls N8nClient.getUser(idOrEmail), and returns JSON response or error.
    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
        };
      }
    }
  • Tool specification including name, description, and input schema in the ListTools response.
      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 method that performs the API request to fetch user by ID or email.
    async getUser(idOrEmail: string): Promise<N8nUser> {
      return this.makeRequest<N8nUser>(`/users/${idOrEmail}`);
    }
  • TypeScript interface defining the structure of a user object returned by the n8n API.
    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?

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.

Install Server

Other Tools

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

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