Skip to main content
Glama

update_page

Modify properties of a Notion page, including status, dates, numbers, and other fields, to update database records with new information.

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
NameRequiredDescriptionDefault
pageIdYesThe ID of the Notion page to update (32 or 36 character UUID format). Example: "123e4567-e89b-12d3-a456-426614174000"
propertiesYesObject 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

  • Registers the 'update_page' MCP tool, including name, detailed description, and comprehensive input schema supporting all Notion property types.
          {
            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'],
            },
          },
  • MCP server handler method that executes the 'update_page' tool by invoking the UpdatePageUseCase and formatting the 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
            ),
          },
        ],
      };
    }
  • TypeScript interface defining the input parameters for the UpdatePageUseCase.
    export interface UpdatePageInput {
      pageId: string;
      properties: Partial<PageProperties>;
    }
  • Core business logic use case that handles page updates by delegating to the page 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);
      }
    }
  • Dependency injection registration providing the UpdatePageUseCase instance to the MCPServer.
    updatePageUseCase: this.getUpdatePageUseCase(),

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