Skip to main content
Glama
SunCreation

MCP Notion Server (@suncreation)

by SunCreation

notion_create_page

Create a new page as a child of an existing page or database in Notion, with support for structured content blocks and properties.

Instructions

Create a page as child of page or database. LIMITS: 100 blocks, 2 nesting levels, 2000 chars.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
parentYesParent of the page. Specify either page_id (to create a subpage) or database_id (to create a database item).
propertiesYesPage properties. For pages with a page parent, use 'title' property. For database items, match the database schema.
childrenNoPage content as an array of block objects.
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 handler that processes the notion_create_page tool request. It validates required arguments (parent and properties), extracts the CreatePageArgs from the request, and calls notionClient.createPage() with the parent, properties, and optional children.
    case "notion_create_page": {
      const pageArgs = request.params
        .arguments as unknown as args.CreatePageArgs;
      if (!pageArgs.parent || !pageArgs.properties) {
        throw new Error("Missing required arguments: parent and properties");
      }
      response = await notionClient.createPage(
        pageArgs.parent,
        pageArgs.properties,
        pageArgs.children
      );
      break;
    }
  • The tool schema definition for notion_create_page, including its name, description with limits (100 blocks, 2 nesting levels, 2000 chars), input schema with parent (page_id or database_id), properties, children (array of block objects), and format parameters.
    export const createPageTool: Tool = {
      name: "notion_create_page",
      description: "Create a page as child of page or database. **LIMITS:** 100 blocks, 2 nesting levels, 2000 chars.",
      inputSchema: {
        type: "object",
        properties: {
          parent: {
            type: "object",
            description: "Parent of the page. Specify either page_id (to create a subpage) or database_id (to create a database item).",
            properties: {
              page_id: {
                type: "string",
                description: "The ID of the parent page." + commonIdDescription,
              },
              database_id: {
                type: "string",
                description: "The ID of the parent database." + commonIdDescription,
              },
            },
          },
          properties: {
            type: "object",
            description: "Page properties. For pages with a page parent, use 'title' property. For database items, match the database schema.",
          },
          children: {
            type: "array",
            description: "Page content as an array of block objects.",
            items: blockObjectSchema,
          },
          format: formatParameter,
        },
        required: ["parent", "properties"],
      },
    };
  • The NotionClientWrapper.createPage method that implements the actual API call to Notion's /pages endpoint. It constructs the request body with parent, properties, and optional children, then makes a POST request to create the page.
    async createPage(
      parent: { database_id?: string; page_id?: string },
      properties: Record<string, any>,
      children?: Partial<BlockResponse>[]
    ): Promise<PageResponse> {
      const body: Record<string, any> = { parent, properties };
      if (children && children.length > 0) {
        body.children = children;
      }
    
      const response = await fetch(`${this.baseUrl}/pages`, {
        method: "POST",
        headers: this.headers,
        body: JSON.stringify(body),
      });
    
      return this.handleResponse<PageResponse>(response);
    }
  • TypeScript interface defining the CreatePageArgs type used for type-safe argument handling, including parent (with optional database_id or page_id), properties as a generic record, optional children array, and optional format string.
    export interface CreatePageArgs {
      parent: { database_id?: string; page_id?: string };
      properties: Record<string, any>;
      children?: Partial<BlockResponse>[];
      format?: "json" | "markdown";
    }
Behavior4/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 successfully communicates critical constraints ('LIMITS: 100 blocks, 2 nesting levels, 2000 chars') that aren't evident from the schema alone. However, it doesn't mention authentication requirements, error conditions, or rate limits that would be valuable for a mutation tool.

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 perfectly concise - a single sentence that states the core purpose followed by critical constraints. Every word earns its place, and the information is front-loaded with no unnecessary elaboration. The bold formatting for 'LIMITS' effectively highlights the most important behavioral constraint.

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?

For a complex mutation tool with no annotations and no output schema, the description is adequate but has clear gaps. It covers the basic purpose and critical constraints, but doesn't address error handling, response format expectations, or integration patterns with sibling tools. The schema richness compensates somewhat, but more behavioral context 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?

With 100% schema description coverage, the schema already documents all parameters thoroughly. The description adds minimal value beyond what's in the schema - it mentions the parent relationship but doesn't provide additional context about parameter interactions or usage patterns. The baseline of 3 is appropriate when the schema does the heavy lifting.

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 page'), the resource ('as child of page or database'), and distinguishes it from siblings by focusing on page creation rather than database operations or updates. It provides a complete verb+resource statement that is immediately understandable.

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

Usage Guidelines2/5

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

The description provides no guidance on when to use this tool versus alternatives like 'notion_create_database_item' or 'notion_update_page_properties'. It doesn't mention prerequisites, dependencies, or contextual factors that would help an agent choose between this and sibling tools for content creation scenarios.

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

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