Skip to main content
Glama

notion_retrieve_user

Retrieve user details from Notion using their user ID. Supports JSON for data manipulation or Markdown for readable output. Requires Notion Enterprise plan and Organization API key.

Instructions

Retrieve a specific user by user_id in Notion. Note: This function requires upgrading to the Notion Enterprise plan and using an Organization API key to avoid permission errors.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
user_idYesThe ID of the user to retrieve.It should be a 32-character string (excluding hyphens) formatted as 8-4-4-4-12 with hyphens (-).
formatNoSpecify the response format. 'json' returns the original data structure, 'markdown' returns a more readable format. Use 'markdown' when the user only needs to read the page and isn't planning to write or modify it. Use 'json' when the user needs to read the page with the intention of writing to or modifying it.markdown

Implementation Reference

  • MCP tool handler for 'notion_retrieve_user': validates user_id argument and delegates to NotionClientWrapper.retrieveUser
    case "notion_retrieve_user": {
      const args = request.params
        .arguments as unknown as args.RetrieveUserArgs;
      if (!args.user_id) {
        throw new Error("Missing required argument: user_id");
      }
      response = await notionClient.retrieveUser(args.user_id);
      break;
    }
  • Tool schema definition for 'notion_retrieve_user' specifying input requirements (user_id) and description
    export const retrieveUserTool: Tool = {
      name: "notion_retrieve_user",
      description:
        "Retrieve a specific user by user_id in Notion. **Note:** This function requires upgrading to the Notion Enterprise plan and using an Organization API key to avoid permission errors.",
      inputSchema: {
        type: "object",
        properties: {
          user_id: {
            type: "string",
            description: "The ID of the user to retrieve." + commonIdDescription,
          },
          format: formatParameter,
        },
        required: ["user_id"],
      },
    };
  • Registration of 'notion_retrieve_user' tool via inclusion in allTools array returned by ListTools handler
    const allTools = [
      schemas.appendBlockChildrenTool,
      schemas.retrieveBlockTool,
      schemas.retrieveBlockChildrenTool,
      schemas.deleteBlockTool,
      schemas.updateBlockTool,
      schemas.retrievePageTool,
      schemas.updatePagePropertiesTool,
      schemas.listAllUsersTool,
      schemas.retrieveUserTool,
      schemas.retrieveBotUserTool,
      schemas.createDatabaseTool,
      schemas.queryDatabaseTool,
      schemas.retrieveDatabaseTool,
      schemas.updateDatabaseTool,
      schemas.createDatabaseItemTool,
      schemas.createCommentTool,
      schemas.retrieveCommentsTool,
      schemas.searchTool,
    ];
    return {
      tools: filterTools(allTools, enabledToolsSet),
    };
  • Core helper method in NotionClientWrapper that performs the actual Notion API GET request to /users/{user_id}
    async retrieveUser(user_id: string): Promise<UserResponse> {
      const response = await fetch(`${this.baseUrl}/users/${user_id}`, {
        method: "GET",
        headers: this.headers,
      });
      return response.json();
    }
Behavior4/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 effectively describes key behavioral traits: it's a read operation (implied by 'retrieve'), requires specific permissions (Enterprise plan and Organization API key), and warns about potential errors (permission errors). However, it doesn't mention rate limits, response format details, or error handling beyond permissions.

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 perfectly concise with two sentences: the first states the purpose, and the second provides critical usage prerequisites. Every word earns its place, and the structure is front-loaded with the core functionality followed by important constraints.

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

Completeness4/5

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

For a read operation with no annotations and no output schema, the description is quite complete: it covers purpose, prerequisites, and distinguishes from siblings. However, it doesn't describe the return value format or potential error scenarios beyond permissions, leaving some gaps in contextual understanding.

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

Parameters3/5

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

Schema description coverage is 100%, so the schema already fully documents both parameters (user_id format and format enum with usage guidance). The description adds no additional parameter semantics beyond what's in the schema, maintaining the baseline score of 3 for high schema coverage.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the specific action ('Retrieve a specific user') and resource ('by user_id in Notion'), distinguishing it from sibling tools like notion_list_all_users (which lists all users) and notion_retrieve_bot_user (which retrieves a bot user). The verb 'retrieve' is precise and the scope is well-defined.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description explicitly states when to use this tool ('Retrieve a specific user by user_id') and provides critical prerequisites ('requires upgrading to the Notion Enterprise plan and using an Organization API key to avoid permission errors'), which helps the agent avoid errors. It also implicitly distinguishes it from notion_list_all_users for bulk retrieval.

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/kimjungyeol/mcp-notion-server'

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