Skip to main content
Glama
SunCreation

MCP Notion Server (@suncreation)

by SunCreation

notion_retrieve_comments

Retrieve unresolved comments from Notion pages or blocks to track feedback and discussions. Supports JSON for data processing or markdown for readability.

Instructions

Retrieve a list of unresolved comments from a Notion page or block. Requires the integration to have 'read comment' capabilities.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
block_idYesThe ID of the block or page whose comments you want to retrieve.It should be a 32-character string (excluding hyphens) formatted as 8-4-4-4-12 with hyphens (-).
start_cursorNoIf supplied, returns a page of results starting after the cursor.
page_sizeNoNumber of comments 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

  • The actual implementation of retrieveComments method in NotionClientWrapper. Makes a GET request to the Notion API's /comments endpoint with block_id, start_cursor, and page_size parameters to retrieve comments from a page or block.
    async retrieveComments( block_id: string, start_cursor?: string, page_size?: number ): Promise<ListResponse> { const params = new URLSearchParams(); params.append("block_id", block_id); 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}/comments?${params.toString()}`, { method: "GET", headers: this.headers, } ); return response.json(); }
  • Tool registration in the MCP server's request handler. Parses arguments as RetrieveCommentsArgs, validates required block_id parameter, and calls notionClient.retrieveComments() with the provided arguments.
    case "notion_retrieve_comments": { const args = request.params .arguments as unknown as args.RetrieveCommentsArgs; if (!args.block_id) { throw new Error("Missing required argument: block_id"); } response = await notionClient.retrieveComments( args.block_id, args.start_cursor, args.page_size ); break; }
  • Tool schema definition for notion_retrieve_comments. Defines the input schema with required block_id parameter and optional start_cursor, page_size, and format parameters, along with the tool's description.
    export const retrieveCommentsTool: Tool = { name: "notion_retrieve_comments", description: "Retrieve a list of unresolved comments from a Notion page or block. Requires the integration to have 'read comment' capabilities.", inputSchema: { type: "object", properties: { block_id: { type: "string", description: "The ID of the block or page whose comments you want to retrieve." + commonIdDescription, }, start_cursor: { type: "string", description: "If supplied, returns a page of results starting after the cursor.", }, page_size: { type: "number", description: "Number of comments to retrieve (max 100).", }, format: formatParameter, }, required: ["block_id"], }, };
  • TypeScript interface for RetrieveCommentsArgs defining the expected argument structure with block_id (required), start_cursor (optional), page_size (optional), and format (optional) properties.
    export interface RetrieveCommentsArgs { block_id: string; start_cursor?: string; page_size?: number; 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