create-page
Add a new page to a Notion database with custom properties and optional content blocks.
Instructions
Create a new page in a database
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| parent_id | Yes | ID of the parent database | |
| properties | Yes | Page properties | |
| children | No | Optional content blocks |
Implementation Reference
- server.js:377-399 (handler)The execution handler for the 'create-page' tool. It extracts parameters from the request, constructs the page creation payload, calls the Notion API to create the page, and returns the response as text content.else if (name === "create-page") { const { parent_id, properties, children } = args; const pageParams = { parent: { database_id: parent_id }, properties, }; if (children) { pageParams.children = children; } const response = await notion.pages.create(pageParams); return { content: [ { type: "text", text: JSON.stringify(response, null, 2), }, ], }; }
- server.js:83-104 (registration)Registration of the 'create-page' tool in the tools/list endpoint, defining its name, description, and input schema for validation.{ name: "create-page", description: "Create a new page in a database", inputSchema: { type: "object", properties: { parent_id: { type: "string", description: "ID of the parent database" }, properties: { type: "object", description: "Page properties" }, children: { type: "array", description: "Optional content blocks" } }, required: ["parent_id", "properties"] } },