Skip to main content
Glama

notion_list_all_users

Retrieve all users in a Notion workspace using pagination and format options. Requires Notion Enterprise plan with Organization API key for access.

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 handler implementation that performs the GET request to Notion's /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();
    }
  • Server-side dispatch handler that extracts arguments and calls the NotionClientWrapper's listAllUsers 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;
    }
  • Tool schema definition including name, description, and 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,
        },
      },
    };
  • Registration of the tool in the list of available tools returned by ListToolsRequest handler.
    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),
      };
    });
  • TypeScript interface defining the argument types used in the server handler.
    export interface ListAllUsersArgs {
      start_cursor?: string;
      page_size?: number;
      format?: "json" | "markdown";
    }
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 reveals critical behavioral traits: this is a read operation (implied by 'List'), it has specific authentication requirements (Enterprise plan + Organization API key), and it may produce permission errors if those requirements aren't met. It doesn't mention rate limits, pagination behavior (though the schema covers this), or what happens on empty results, but provides substantial value beyond basic purpose.

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 consists of two concise sentences that are front-loaded with the core purpose followed by an important usage note. Every word earns its place, with no redundancy or unnecessary elaboration. The structure moves from general purpose to specific requirements efficiently.

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 no annotations and no output schema, the description provides good context about authentication requirements and plan limitations. It doesn't describe the return format or structure, but the format parameter in the schema partially addresses this. The description could be more complete by mentioning what user information is returned or typical use cases, but it covers the most critical contextual elements well.

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 adds no additional parameter information beyond what's in the schema. According to the scoring rules, when schema coverage is high (>80%), the baseline is 3 even with no param info in the description, which applies here.

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 verb ('List') and resource ('all users in the Notion workspace'), making the purpose specific and unambiguous. It distinguishes itself from sibling tools like 'notion_retrieve_user' (singular) by emphasizing 'all users' and from 'notion_search' by focusing specifically on user listing rather than general search.

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 provides when-to-use guidance with the note about requiring an Enterprise plan and Organization API key to avoid permission errors. It also implicitly distinguishes usage from 'notion_retrieve_user' (single user) and 'notion_search' (general content), though it doesn't explicitly name alternatives. The format parameter description in the schema provides additional usage guidance for choosing between json and markdown formats.

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

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