notion_retrieve_bot_user
Retrieve the bot user associated with the current Notion API token to verify authentication and access permissions for workspace interactions.
Instructions
Retrieve the bot user associated with the current token in Notion
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| random_string | Yes | Dummy parameter for no-parameter tools | |
| format | No | Specify 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
- src/server/index.ts:158-161 (handler)Handles the MCP CallToolRequest for 'notion_retrieve_bot_user' by invoking the NotionClientWrapper's retrieveBotUser method.case "notion_retrieve_bot_user": { response = await notionClient.retrieveBotUser(); break; }
- src/types/schemas.ts:199-214 (schema)Defines the input schema, name, and description for the 'notion_retrieve_bot_user' tool.export const retrieveBotUserTool: Tool = { name: "notion_retrieve_bot_user", description: "Retrieve the bot user associated with the current token in Notion", inputSchema: { type: "object", properties: { random_string: { type: "string", description: "Dummy parameter for no-parameter tools", }, format: formatParameter, }, required: ["random_string"], }, };
- src/server/index.ts:313-313 (registration)Includes the tool schema in the list of available tools for the ListToolsRequest handler.schemas.retrieveBotUserTool,
- src/client/index.ts:149-155 (helper)Core implementation that fetches the bot user information from the Notion API endpoint '/users/me'.async retrieveBotUser(): Promise<UserResponse> { const response = await fetch(`${this.baseUrl}/users/me`, { method: "GET", headers: this.headers, }); return response.json(); }