Skip to main content
Glama

notion_retrieve_comments

Retrieve unresolved comments from Notion pages or blocks to review 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

  • Core implementation of the notion_retrieve_comments tool: constructs query params for block_id and pagination, then fetches from Notion API /comments endpoint.
    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();
    }
  • Schema definition for the notion_retrieve_comments tool, including name, description, and input schema with required block_id and optional pagination/format.
    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"],
      },
    };
  • Server-side handler case for notion_retrieve_comments: validates arguments and calls NotionClientWrapper.retrieveComments.
    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;
    }
  • Registers the notion_retrieve_comments tool (as schemas.retrieveCommentsTool) in the list of available tools returned by ListToolsRequest.
    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),
      };
    });
Behavior3/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 mentions the required capability ('read comment' capabilities) and implies read-only behavior through 'retrieve,' but doesn't disclose other important traits like rate limits, pagination behavior (though hinted via parameters), error conditions, or what 'unresolved' specifically means. It adds some context but leaves gaps for a tool with no annotation coverage.

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 is two sentences, front-loaded with the core purpose and followed by a prerequisite. Every word earns its place with zero waste, making it highly efficient and easy to parse for an AI agent.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given no annotations and no output schema, the description is moderately complete but has gaps. It covers the purpose and a prerequisite, but for a tool with 4 parameters and behavioral complexity (e.g., pagination, format options), it lacks details on return values, error handling, and full behavioral context. It's adequate but not fully comprehensive for the tool's complexity.

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 documents all parameters thoroughly. The description doesn't add any meaning beyond what the schema provides—it doesn't explain parameter interactions, defaults, or usage nuances. Baseline 3 is appropriate when the schema does the heavy lifting, though no extra value is added.

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 specific action ('retrieve a list of unresolved comments') and target resource ('from a Notion page or block'), distinguishing it from sibling tools like notion_create_comment (which creates comments) and notion_retrieve_block (which retrieves block content rather than comments). The verb 'retrieve' and resource 'comments' are precise and unambiguous.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides clear context for when to use this tool ('retrieve a list of unresolved comments') and mentions a prerequisite ('Requires the integration to have 'read comment' capabilities'), but it doesn't explicitly state when NOT to use it or name alternatives among sibling tools (e.g., notion_retrieve_block for page content instead of comments). The guidance is helpful but not comprehensive.

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

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