Skip to main content
Glama
DrBalls

n8n MCP Server

by DrBalls

Get Current n8n User

n8n_get_current_user
Read-onlyIdempotent

Retrieve details of the authenticated user, including ID, email, name, and role, for identity verification and access control in n8n workflow automation.

Instructions

Get details of the currently authenticated user (owner of the API key).

Returns: Current user details with id, email, name, and role.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • The handler function that executes the logic for n8n_get_current_user by calling /users/me.
      async () => {
        const user = await get<N8nUser>('/users/me');
        
        return {
          content: [{ type: 'text', text: `**Current User:**\n\n${formatUser(user)}` }],
          structuredContent: user
        };
      }
    );
  • Registration of the n8n_get_current_user tool.
      server.registerTool(
        'n8n_get_current_user',
        {
          title: 'Get Current n8n User',
          description: `Get details of the currently authenticated user (owner of the API key).
    
    Returns:
      Current user details with id, email, name, and role.`,
          inputSchema: EmptySchema,
          annotations: {
            readOnlyHint: true,
            destructiveHint: false,
            idempotentHint: true,
            openWorldHint: false
          }
        },
        async () => {
          const user = await get<N8nUser>('/users/me');
          
          return {
            content: [{ type: 'text', text: `**Current User:**\n\n${formatUser(user)}` }],
            structuredContent: user
          };
        }
      );
Behavior4/5

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

Annotations already provide strong behavioral hints (read-only, non-destructive, idempotent, closed-world). The description adds valuable context by specifying it returns details of the 'currently authenticated user' and listing the returned fields (id, email, name, role), which helps the agent understand the output format despite no output schema.

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 two sentences: one stating the purpose and one detailing the return values. Every word serves a purpose, and it's front-loaded with the core functionality.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a simple read-only tool with comprehensive annotations, 0 parameters, and no output schema, the description is complete. It explains what the tool does, who it targets, and what data it returns, providing sufficient context for an agent to use it correctly.

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

Parameters4/5

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

With 0 parameters and 100% schema description coverage, the baseline is 4. The description correctly indicates no parameters are needed by not mentioning any, aligning with the empty input schema.

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 details of the currently authenticated user' with specific resource details (owner of API key). It distinguishes from sibling 'n8n_get_user' by specifying 'current' user, but doesn't explicitly mention this distinction.

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 implies usage context through 'currently authenticated user' and 'owner of the API key,' suggesting it's for identifying the API caller. However, it doesn't provide explicit guidance on when to use this versus 'n8n_get_user' or 'n8n_list_users' from the sibling list.

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

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