update_page
Modify properties of Notion database pages including status, dates, assignees, progress, and other fields to keep project information current and organized.
Instructions
Updates properties (fields) of a Notion page (database record). Supports ALL property types: title, status, date, checkbox, number, select, multi-select, URL, email, phone number, people, relations, and more. You can update individual properties or multiple properties simultaneously. Examples: change status to "Completed", update progress to 80%, set deadline to next Friday, change assignee, etc.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| pageId | Yes | The ID of the Notion page to update (32 or 36 character UUID format). Example: "123e4567-e89b-12d3-a456-426614174000" | |
| properties | Yes | Object containing properties to update. Use property names as keys and provide values according to property types. Supported property types and formats: 1. Title: { "Name": { "title": [{ "text": { "content": "New title" } }] } } 2. Rich Text: { "Description": { "rich_text": [{ "text": { "content": "Description text" } }] } } 3. Select: { "Status": { "select": { "name": "In Progress" } } } 4. Multi-select: { "Tags": { "multi_select": [{ "name": "Important" }, { "name": "Urgent" }] } } 5. Date: { "Due Date": { "date": { "start": "2024-12-31" } } } Date range: { "date": { "start": "2024-01-01", "end": "2024-12-31" } } 6. Checkbox: { "Completed": { "checkbox": true } } 7. Number: { "Progress": { "number": 75 } } 8. URL: { "Website": { "url": "https://example.com" } } 9. Email: { "Email": { "email": "user@example.com" } } 10. Phone Number: { "Phone": { "phone_number": "+1-234-567-8900" } } 11. People: { "Assignee": { "people": [{ "id": "user-id-123" }] } } 12. Relation: { "Related Project": { "relation": [{ "id": "page-id-456" }] } } Example updating multiple properties: { "Status": { "select": { "name": "In Progress" } }, "Progress": { "number": 50 }, "Due Date": { "date": { "start": "2024-12-31" } } } |
Implementation Reference
- The primary MCP tool handler for 'update_page'. Processes arguments, calls UpdatePageUseCase, and returns formatted response.private async handleUpdatePage(args: any) { const result = await this.dependencies.updatePageUseCase.execute({ pageId: args.pageId, properties: args.properties, }); return { content: [ { type: 'text' as const, text: JSON.stringify( { id: result.id.toString(), properties: result.properties, lastEditedTime: result.lastEditedTime, }, null, 2 ), }, ], }; }
- Input schema definition for the 'update_page' tool, including detailed property types and examples for Notion API compatibility.inputSchema: { type: 'object', properties: { pageId: { type: 'string', description: 'The ID of the Notion page to update (32 or 36 character UUID format). Example: "123e4567-e89b-12d3-a456-426614174000"', }, properties: { type: 'object', description: `Object containing properties to update. Use property names as keys and provide values according to property types. Supported property types and formats: 1. Title: { "Name": { "title": [{ "text": { "content": "New title" } }] } } 2. Rich Text: { "Description": { "rich_text": [{ "text": { "content": "Description text" } }] } } 3. Select: { "Status": { "select": { "name": "In Progress" } } } 4. Multi-select: { "Tags": { "multi_select": [{ "name": "Important" }, { "name": "Urgent" }] } } 5. Date: { "Due Date": { "date": { "start": "2024-12-31" } } } Date range: { "date": { "start": "2024-01-01", "end": "2024-12-31" } } 6. Checkbox: { "Completed": { "checkbox": true } } 7. Number: { "Progress": { "number": 75 } } 8. URL: { "Website": { "url": "https://example.com" } } 9. Email: { "Email": { "email": "user@example.com" } } 10. Phone Number: { "Phone": { "phone_number": "+1-234-567-8900" } } 11. People: { "Assignee": { "people": [{ "id": "user-id-123" }] } } 12. Relation: { "Related Project": { "relation": [{ "id": "page-id-456" }] } } Example updating multiple properties: { "Status": { "select": { "name": "In Progress" } }, "Progress": { "number": 50 }, "Due Date": { "date": { "start": "2024-12-31" } } }`, }, }, required: ['pageId', 'properties'], },
- src/presentation/mcp/MCPServer.ts:139-202 (registration)Tool registration in getTools() method, defining name, description, and input schema for 'update_page'.{ name: 'update_page', description: 'Updates properties (fields) of a Notion page (database record). Supports ALL property types: title, status, date, checkbox, number, select, multi-select, URL, email, phone number, people, relations, and more. You can update individual properties or multiple properties simultaneously. Examples: change status to "Completed", update progress to 80%, set deadline to next Friday, change assignee, etc.', inputSchema: { type: 'object', properties: { pageId: { type: 'string', description: 'The ID of the Notion page to update (32 or 36 character UUID format). Example: "123e4567-e89b-12d3-a456-426614174000"', }, properties: { type: 'object', description: `Object containing properties to update. Use property names as keys and provide values according to property types. Supported property types and formats: 1. Title: { "Name": { "title": [{ "text": { "content": "New title" } }] } } 2. Rich Text: { "Description": { "rich_text": [{ "text": { "content": "Description text" } }] } } 3. Select: { "Status": { "select": { "name": "In Progress" } } } 4. Multi-select: { "Tags": { "multi_select": [{ "name": "Important" }, { "name": "Urgent" }] } } 5. Date: { "Due Date": { "date": { "start": "2024-12-31" } } } Date range: { "date": { "start": "2024-01-01", "end": "2024-12-31" } } 6. Checkbox: { "Completed": { "checkbox": true } } 7. Number: { "Progress": { "number": 75 } } 8. URL: { "Website": { "url": "https://example.com" } } 9. Email: { "Email": { "email": "user@example.com" } } 10. Phone Number: { "Phone": { "phone_number": "+1-234-567-8900" } } 11. People: { "Assignee": { "people": [{ "id": "user-id-123" }] } } 12. Relation: { "Related Project": { "relation": [{ "id": "page-id-456" }] } } Example updating multiple properties: { "Status": { "select": { "name": "In Progress" } }, "Progress": { "number": 50 }, "Due Date": { "date": { "start": "2024-12-31" } } }`, }, }, required: ['pageId', 'properties'], }, },
- Business logic handler (use case) that performs the actual page update via repository.export class UpdatePageUseCase { constructor(private readonly pageRepository: IPageRepository) {} async execute(input: UpdatePageInput): Promise<Page> { const pageId = new PageId(input.pageId); return await this.pageRepository.update(pageId, input.properties); } }
- Type definition for UpdatePageUseCase input.export interface UpdatePageInput { pageId: string; properties: Partial<PageProperties>; }