Skip to main content
Glama

list-users

Retrieve all users from your Notion workspace to manage permissions and identify collaborators.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • The inline handler and registration for the 'list-users' MCP tool. It invokes NotionService.listUsers(), serializes the response as JSON text, and handles errors by returning an error message.
    this.server.tool("list-users", {}, async () => { try { const results = await this.notionService.listUsers(); return { content: [ { type: "text", text: JSON.stringify(results, null, 2), }, ], }; } catch (error) { console.error("Error in list-users tool:", error); return { content: [ { type: "text", text: `Error: Failed to list Notion users - ${ (error as Error).message }`, }, ], isError: true, }; } });
  • The NotionService.listUsers() method, which calls the underlying Notion Client's users.list() API with error handling via handleError.
    /** * List all users */ async listUsers() { try { return await this.client.users.list({}); } catch (error) { this.handleError(error); } }
  • High-level call to registerUserTools() within registerTools(), which includes the 'list-users' tool registration.
    this.registerUserTools();

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

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