Skip to main content
Glama
SunCreation

MCP Notion Server (@suncreation)

by SunCreation

notion_retrieve_bot_user

Retrieve the bot user associated with the current Notion API token to identify the authenticated account for workspace interactions.

Instructions

Retrieve the bot user associated with the current token in Notion

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
random_stringYesDummy parameter for no-parameter tools
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

  • The main handler implementation that executes the tool logic - makes a GET request to Notion's /users/me endpoint to retrieve the bot user associated with the current token.
    async retrieveBotUser(): Promise<UserResponse> { const response = await fetch(`${this.baseUrl}/users/me`, { method: "GET", headers: this.headers, }); return response.json(); }
  • The switch case that handles the tool invocation when 'notion_retrieve_bot_user' is called, executing the notionClient.retrieveBotUser() method.
    case "notion_retrieve_bot_user": { response = await notionClient.retrieveBotUser(); break; }
  • Registration of the tool schema in the allTools array that exposes the tool to the MCP server.
    schemas.retrieveBotUserTool,
  • Tool schema definition that defines the tool name 'notion_retrieve_bot_user', description, and input schema with a dummy parameter for no-parameter tools.
    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"], }, };
  • Type definition for RetrieveBotUserArgs interface defining the expected input arguments for the tool.
    export interface RetrieveBotUserArgs { random_string: string; format?: "json" | "markdown"; }

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

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