Skip to main content
Glama

notion_create_page

Create a new page in Notion as a child of an existing page or database. Define properties, add content blocks, and optionally include icons or cover images.

Instructions

Creates a new page in Notion. Can be a child of a page or database.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
childrenNoOptional page content as array of block objects
coverNoOptional page cover image
iconNoOptional page icon
parentYesParent page or database
propertiesYesPage properties. Must match parent database schema if parent is a database.

Implementation Reference

  • The handler function that implements the core logic for creating a Notion page using the NotionClient.
    export async function handleCreatePageTool(client: NotionClient, args: any) {
        try {
            const createArgs: CreatePageArgs = {
                parent: args.parent,
                properties: args.properties,
                ...(args.children && { children: args.children }),
                ...(args.icon && { icon: args.icon }),
                ...(args.cover && { cover: args.cover })
            };
    
            const response = await client.createPage(createArgs);
            
            return {
                content: [
                    {
                        type: 'text',
                        text: `Successfully created page with ID: ${response.id}\nURL: ${'url' in response ? response.url : 'N/A'}`
                    }
                ]
            };
        } catch (error: any) {
            return {
                content: [
                    {
                        type: 'text',
                        text: `Error creating page: ${error.message || 'Unknown error'}`
                    }
                ],
                isError: true
            };
        }
    }
  • The tool definition including the detailed input schema for validating arguments to notion_create_page.
    export const createPageToolDefinition: Tool = {
        name: 'notion_create_page',
        description: 'Creates a new page in Notion. Can be a child of a page or database.',
        inputSchema: {
            type: 'object',
            properties: {
                parent: {
                    type: 'object',
                    properties: {
                        type: {
                            type: 'string',
                            enum: ['page_id', 'database_id'],
                            description: 'Type of parent'
                        },
                        page_id: {
                            type: 'string',
                            description: 'ID of parent page (required if type is page_id)'
                        },
                        database_id: {
                            type: 'string',
                            description: 'ID of parent database (required if type is database_id)'
                        }
                    },
                    required: ['type'],
                    description: 'Parent page or database'
                },
                properties: {
                    type: 'object',
                    description: 'Page properties. Must match parent database schema if parent is a database.'
                },
                children: {
                    type: 'array',
                    description: 'Optional page content as array of block objects',
                    items: {
                        type: 'object'
                    }
                },
                icon: {
                    type: 'object',
                    properties: {
                        type: {
                            type: 'string',
                            enum: ['emoji', 'external']
                        },
                        emoji: {
                            type: 'string',
                            description: 'Emoji character (if type is emoji)'
                        },
                        external: {
                            type: 'object',
                            properties: {
                                url: {
                                    type: 'string',
                                    description: 'URL of external image'
                                }
                            }
                        }
                    },
                    description: 'Optional page icon'
                },
                cover: {
                    type: 'object',
                    properties: {
                        type: {
                            type: 'string',
                            enum: ['external']
                        },
                        external: {
                            type: 'object',
                            properties: {
                                url: {
                                    type: 'string',
                                    description: 'URL of cover image'
                                }
                            },
                            required: ['url']
                        }
                    },
                    required: ['type', 'external'],
                    description: 'Optional page cover image'
                }
            },
            required: ['parent', 'properties']
        }
    };
  • src/server.ts:52-75 (registration)
    Registration of the tool handler in the MCP server's CallToolRequestSchema handler via switch case.
        this.server.setRequestHandler(CallToolRequestSchema, async (request) => {
            const { name, arguments: args } = request.params;
    
            switch (name) {
                case 'notion_create_page':
                    return handleCreatePageTool(this.client, args);
                
                case 'notion_retrieve_page':
                    return handleRetrievePageTool(this.client, args);
                
                case 'notion_update_page':
                    return handleUpdatePageTool(this.client, args);
                
                case 'notion_retrieve_page_property':
                    return handleRetrievePagePropertyTool(this.client, args);
                
                default:
                    throw new McpError(
                        ErrorCode.MethodNotFound,
                        `Unknown tool: ${name}`
                    );
            }
        });
    }
  • src/server.ts:43-50 (registration)
    Registration of the tool definition in the MCP server's ListToolsRequestSchema handler.
    this.server.setRequestHandler(ListToolsRequestSchema, async () => ({
        tools: [
            createPageToolDefinition,
            retrievePageToolDefinition,
            updatePageToolDefinition,
            retrievePagePropertyToolDefinition
        ],
    }));
Behavior2/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 states the tool creates a new page, implying a write operation, but fails to mention critical behavioral aspects such as required permissions, rate limits, error conditions, or what happens on success (e.g., returns a page ID). This leaves significant gaps for an AI agent.

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 with just two sentences that directly state the tool's purpose and a key usage note. It is front-loaded with the core action and wastes no words, making it easy for an AI agent to parse quickly.

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

Completeness2/5

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

Given the complexity (5 parameters with nested objects, no output schema, and no annotations), the description is incomplete. It doesn't address what the tool returns, error handling, or behavioral constraints, which are crucial for a creation tool with multiple parameters. The high schema coverage helps but doesn't compensate for the lack of output and behavioral context.

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?

The schema description coverage is 100%, meaning all parameters are documented in the input schema. The description adds no additional parameter semantics beyond what's already in the schema, such as explaining the relationship between 'parent' and 'properties' or providing examples. This meets the baseline for high schema coverage.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the action ('Creates a new page') and resource ('in Notion'), which provides a specific verb+resource combination. However, it doesn't explicitly distinguish this tool from its sibling 'notion_update_page' beyond the creation vs. update distinction, missing an opportunity for clearer sibling differentiation.

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

Usage Guidelines3/5

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

The description provides some usage context by mentioning 'Can be a child of a page or database,' which implies when to use it for hierarchical page creation. However, it lacks explicit guidance on when to choose this tool over alternatives like 'notion_update_page' or prerequisites for successful invocation.

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

Related 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/michaelwaves/notion-mcp'

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