Skip to main content
Glama

notion_create_comment

Add comments to Notion pages or existing discussion threads using rich text formatting, mentions, and equations.

Instructions

Create a comment in Notion. This requires the integration to have 'insert comment' capabilities. You can either specify a page parent or a discussion_id, but not both.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
parentNoParent object that specifies the page to comment on. Must include a page_id if used.
discussion_idNoThe ID of an existing discussion thread to add a comment to.It should be a 32-character string (excluding hyphens) formatted as 8-4-4-4-12 with hyphens (-).
rich_textYesArray of rich text objects representing the comment content.
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

  • MCP tool handler for 'notion_create_comment': validates input arguments and calls NotionClientWrapper.createComment method.
    case "notion_create_comment": {
      const args = request.params
        .arguments as unknown as args.CreateCommentArgs;
    
      if (!args.parent && !args.discussion_id) {
        throw new Error(
          "Either parent.page_id or discussion_id must be provided"
        );
      }
    
      response = await notionClient.createComment(
        args.parent,
        args.discussion_id,
        args.rich_text
      );
      break;
    }
  • Input schema and metadata definition for the 'notion_create_comment' tool.
    export const createCommentTool: Tool = {
      name: "notion_create_comment",
      description:
        "Create a comment in Notion. This requires the integration to have 'insert comment' capabilities. You can either specify a page parent or a discussion_id, but not both.",
      inputSchema: {
        type: "object",
        properties: {
          parent: {
            type: "object",
            description:
              "Parent object that specifies the page to comment on. Must include a page_id if used.",
            properties: {
              page_id: {
                type: "string",
                description:
                  "The ID of the page to comment on." + commonIdDescription,
              },
            },
          },
          discussion_id: {
            type: "string",
            description:
              "The ID of an existing discussion thread to add a comment to." +
              commonIdDescription,
          },
          rich_text: {
            type: "array",
            description:
              "Array of rich text objects representing the comment content.",
            items: richTextObjectSchema,
          },
          format: formatParameter,
        },
        required: ["rich_text"],
      },
    };
  • Registration of 'notion_create_comment' tool (as schemas.createCommentTool) in the list of available tools returned by ListToolsRequest.
    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),
    };
  • Core implementation of comment creation via Notion API POST /comments endpoint in NotionClientWrapper.
    async createComment(
      parent?: { page_id: string },
      discussion_id?: string,
      rich_text?: RichTextItemResponse[]
    ): Promise<CommentResponse> {
      const body: Record<string, any> = { rich_text };
      if (parent) {
        body.parent = parent;
      }
      if (discussion_id) {
        body.discussion_id = discussion_id;
      }
    
      const response = await fetch(`${this.baseUrl}/comments`, {
        method: "POST",
        headers: this.headers,
        body: JSON.stringify(body),
      });
    
      return response.json();
    }
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations provided, the description carries full burden. It discloses the required capability ('insert comment' capabilities) which is useful context about permissions. However, it doesn't mention other behavioral traits like whether this is a write operation (implied by 'Create'), rate limits, error conditions, or what the response looks like. The description adds some value but leaves significant gaps.

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 extremely concise (two sentences) and front-loaded with the core purpose. Every sentence earns its place: the first states what the tool does and prerequisites, the second clarifies a critical parameter constraint. There's zero wasted text.

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 the complexity (4 parameters with nested objects, no output schema, no annotations), the description is somewhat incomplete. It covers the prerequisite capability and parameter exclusivity but doesn't address the response format, error handling, or provide examples. For a write operation with rich parameter structures, more guidance would be helpful.

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 adds the important semantic constraint that 'parent' and 'discussion_id' are mutually exclusive ('but not both'), which is valuable context beyond the schema. However, it doesn't explain the 'rich_text' parameter's purpose or the 'format' parameter's implications.

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 ('Create a comment'), target resource ('in Notion'), and distinguishes from siblings by focusing on comment creation rather than other Notion operations like creating databases, updating pages, or retrieving content. It's not a tautology of the name.

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: it specifies the required capability ('insert comment' capabilities) and the exclusive choice between 'parent' and 'discussion_id'. However, it doesn't explicitly mention when NOT to use it versus alternatives like updating existing comments or using other sibling tools for different operations.

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