Skip to main content
Glama

create_page

Add new entries like tasks, projects, or notes to Notion databases by setting properties such as title, status, date, and assignee.

Instructions

Creates a new page (record) in a Notion database. Use this to add new entries such as tasks, projects, notes, etc. to any database. You can set properties like title, status, date, assignee, and more when creating the page.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
databaseIdYesThe ID of the Notion database where the page will be created (32 or 36 character UUID format). Example: "123e4567-e89b-12d3-a456-426614174000"
propertiesYesProperties to set for the new page. Use property names as keys and provide values according to property types. The format is the same as update_page. Example (creating a task): { "Name": { "title": [{ "text": { "content": "Write weekly report" } }] }, "Status": { "select": { "name": "TODO" } }, "Priority": { "select": { "name": "High" } }, "Due Date": { "date": { "start": "2024-12-31" } } }

Implementation Reference

  • Tool registration for 'create_page' in the MCP server's getTools() method, including name, description, and detailed input schema.
    { name: 'create_page', description: 'Creates a new page (record) in a Notion database. Use this to add new entries such as tasks, projects, notes, etc. to any database. You can set properties like title, status, date, assignee, and more when creating the page.', inputSchema: { type: 'object', properties: { databaseId: { type: 'string', description: 'The ID of the Notion database where the page will be created (32 or 36 character UUID format). Example: "123e4567-e89b-12d3-a456-426614174000"', }, properties: { type: 'object', description: `Properties to set for the new page. Use property names as keys and provide values according to property types. The format is the same as update_page. Example (creating a task): { "Name": { "title": [{ "text": { "content": "Write weekly report" } }] }, "Status": { "select": { "name": "TODO" } }, "Priority": { "select": { "name": "High" } }, "Due Date": { "date": { "start": "2024-12-31" } } }`, }, }, required: ['databaseId', 'properties'], }, },
  • MCP tool handler for 'create_page'. Dispatches from the CallToolRequestSchema handler, executes the CreatePageUseCase, and formats the response as MCP content.
    private async handleCreatePage(args: any) { const result = await this.dependencies.createPageUseCase.execute({ databaseId: args.databaseId, properties: args.properties, }); return { content: [ { type: 'text' as const, text: JSON.stringify( { id: result.id.toString(), properties: result.properties, createdTime: result.createdTime, lastEditedTime: result.lastEditedTime, }, null, 2 ), }, ], }; }
  • Core business logic handler implementing page creation via repository interaction.
    export class CreatePageUseCase { constructor(private readonly pageRepository: IPageRepository) {} async execute(input: CreatePageInput): Promise<Page> { const databaseId = new DatabaseId(input.databaseId); return await this.pageRepository.create(databaseId, input.properties); } }
  • Type definition for input to CreatePageUseCase, matching the MCP tool schema.
    export interface CreatePageInput { databaseId: string; properties: PageProperties; }

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

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