Skip to main content
Glama

create_page

Add new entries like tasks, projects, and notes to Notion databases. Set properties including title, status, date, assignee, and custom fields when creating database records.

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

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" } } }

Input Schema (JSON Schema)

{ "properties": { "databaseId": { "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\"", "type": "string" }, "properties": { "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.\n\nExample (creating a task):\n{\n \"Name\": { \"title\": [{ \"text\": { \"content\": \"Write weekly report\" } }] },\n \"Status\": { \"select\": { \"name\": \"TODO\" } },\n \"Priority\": { \"select\": { \"name\": \"High\" } },\n \"Due Date\": { \"date\": { \"start\": \"2024-12-31\" } }\n}", "type": "object" } }, "required": [ "databaseId", "properties" ], "type": "object" }

Implementation Reference

  • MCP tool handler for 'create_page' that calls the CreatePageUseCase with input arguments 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 ), }, ], }; }
  • Registration of the 'create_page' MCP tool, including name, description, and detailed input schema definition.
    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'], }, },
  • Input schema/interface for the CreatePageUseCase used by the MCP handler.
    export interface CreatePageInput { databaseId: string; properties: PageProperties; }
  • Core business logic implementation for creating a page in a Notion database, invoked by the MCP tool handler.
    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); } }
  • Dispatch handler in the main CallToolRequestSchema handler that routes 'create_page' calls to the specific handleCreatePage method.
    case 'create_page': return await this.handleCreatePage(args);

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