Skip to main content
Glama

notion_list_all_users

Retrieve all users in a Notion workspace with pagination support and format options for viewing or processing user data.

Instructions

List all users in the Notion workspace. 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
start_cursorNoPagination start cursor for listing users
page_sizeNoNumber of users to retrieve (max 100)
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

  • Core implementation that executes the Notion API call to list all users (/users endpoint) with optional pagination parameters.
    async listAllUsers(
      start_cursor?: string,
      page_size?: number
    ): Promise<ListResponse> {
      const params = new URLSearchParams();
      if (start_cursor) params.append("start_cursor", start_cursor);
      if (page_size) params.append("page_size", page_size.toString());
    
      const response = await fetch(`${this.baseUrl}/users?${params.toString()}`, {
        method: "GET",
        headers: this.headers,
      });
      return response.json();
    }
  • MCP server handler dispatch for the tool: casts arguments and invokes the client method.
    case "notion_list_all_users": {
      const args = request.params
        .arguments as unknown as args.ListAllUsersArgs;
      response = await notionClient.listAllUsers(
        args.start_cursor,
        args.page_size
      );
      break;
    }
  • Defines the MCP Tool object with name, description, and JSON input schema for validation.
    export const listAllUsersTool: Tool = {
      name: "notion_list_all_users",
      description:
        "List all users in the Notion workspace. **Note:** This function requires upgrading to the Notion Enterprise plan and using an Organization API key to avoid permission errors.",
      inputSchema: {
        type: "object",
        properties: {
          start_cursor: {
            type: "string",
            description: "Pagination start cursor for listing users",
          },
          page_size: {
            type: "number",
            description: "Number of users to retrieve (max 100)",
          },
          format: formatParameter,
        },
      },
    };
  • Registers the tool in the MCP ListToolsRequest handler by including it in the list of available tools.
    server.setRequestHandler(ListToolsRequestSchema, async () => {
      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),
      };
    });
Behavior4/5

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

With no annotations provided, the description carries full burden and adds valuable behavioral context: it discloses the Enterprise plan requirement and Organization API key prerequisite, which are critical for successful invocation. However, it doesn't mention pagination behavior or rate limits, leaving some gaps.

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?

Two sentences with zero waste: the first states the core purpose, the second provides critical prerequisite information. The description is appropriately sized and front-loaded with essential information.

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 list operation with 100% schema coverage but no output schema or annotations, the description provides good context about purpose and prerequisites. However, it doesn't describe the return format or structure, which would be helpful given the lack of output schema.

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 all three parameters. The description doesn't add any parameter-specific information 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 ('List all users') and resource ('in the Notion workspace'), distinguishing it from sibling tools like 'notion_retrieve_user' (singular) and 'notion_retrieve_bot_user' (specific type). It provides a complete verb+resource+scope statement.

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 ('List all users in the Notion workspace') and includes a critical prerequisite note about requiring an Enterprise plan and Organization API key to avoid permission errors. This provides clear context and exclusions.

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