Skip to main content
Glama

notion_update_page

Modify Notion page properties, icons, covers, or archive/restore pages directly. Streamline content updates for improved workspace organization.

Instructions

Updates properties of a Notion page. Can also update icon, cover, or archive/restore pages.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
coverNoPage cover image to update
iconNoPage icon to update
in_trashNoSet to true to archive/delete the page, false to restore it
page_idYesThe ID of the page to update
propertiesNoProperties to update. Keys are property names/IDs, values are property values.

Implementation Reference

  • The main handler function for executing the 'notion_update_page' tool. It constructs the update arguments from input, calls NotionClient.updatePage, and returns a formatted response or error message.
    export async function handleUpdatePageTool(client: NotionClient, args: any) {
        try {
            const updateArgs: UpdatePageArgs = {
                page_id: args.page_id,
                ...(args.properties && { properties: args.properties }),
                ...(args.in_trash !== undefined && { archived: args.in_trash }),
                ...(args.icon && { icon: args.icon }),
                ...(args.cover && { cover: args.cover })
            };
    
            const response = await client.updatePage(updateArgs);
            
            return {
                content: [
                    {
                        type: 'text',
                        text: `Successfully updated page: ${response.id}\n` +
                              `URL: ${'url' in response ? response.url : 'N/A'}\n` +
                              `Archived: ${'archived' in response ? response.archived : false}\n` +
                              `Last edited: ${'last_edited_time' in response ? response.last_edited_time : 'N/A'}`
                    }
                ]
            };
        } catch (error: any) {
            return {
                content: [
                    {
                        type: 'text',
                        text: `Error updating page: ${error.message || 'Unknown error'}`
                    }
                ],
                isError: true
            };
        }
    }
  • The tool definition object including name, description, and detailed input schema for validating arguments to the 'notion_update_page' tool.
    export const updatePageToolDefinition: Tool = {
        name: 'notion_update_page',
        description: 'Updates properties of a Notion page. Can also update icon, cover, or archive/restore pages.',
        inputSchema: {
            type: 'object',
            properties: {
                page_id: {
                    type: 'string',
                    description: 'The ID of the page to update'
                },
                properties: {
                    type: 'object',
                    description: 'Properties to update. Keys are property names/IDs, values are property values.'
                },
                in_trash: {
                    type: 'boolean',
                    description: 'Set to true to archive/delete the page, false to restore it'
                },
                icon: {
                    type: 'object',
                    properties: {
                        type: {
                            type: 'string',
                            enum: ['emoji', 'external']
                        },
                        emoji: {
                            type: 'string',
                            description: 'Emoji character (if type is emoji)'
                        },
                        external: {
                            type: 'object',
                            properties: {
                                url: {
                                    type: 'string',
                                    description: 'URL of external image'
                                }
                            }
                        }
                    },
                    description: 'Page icon to update'
                },
                cover: {
                    type: 'object',
                    properties: {
                        type: {
                            type: 'string',
                            enum: ['external']
                        },
                        external: {
                            type: 'object',
                            properties: {
                                url: {
                                    type: 'string',
                                    description: 'URL of cover image'
                                }
                            },
                            required: ['url']
                        }
                    },
                    required: ['type', 'external'],
                    description: 'Page cover image to update'
                }
            },
            required: ['page_id']
        }
    };
  • src/server.ts:62-63 (registration)
    Registration of the tool handler in the switch statement within the main NotionServer class's CallToolRequest handler.
    case 'notion_update_page':
        return handleUpdatePageTool(this.client, args);
  • src/server.ts:125-126 (registration)
    Registration of the tool handler in the switch statement within the standalone server creator's CallToolRequest handler.
    case 'notion_update_page':
        return handleUpdatePageTool(client, args);
  • src/server.ts:47-47 (registration)
    Inclusion of the tool definition in the list of tools returned by ListToolsRequest in the main NotionServer class.
    updatePageToolDefinition,
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations provided, the description carries full burden but lacks critical behavioral details. It mentions update operations but doesn't disclose permission requirements, whether changes are reversible, error handling, or response format. For a mutation tool with zero annotation coverage, this is insufficient.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single, efficient sentence that front-loads the core purpose and lists additional capabilities. It avoids redundancy and wastes no words, though it could be slightly more structured for clarity.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a mutation tool with 5 parameters, no annotations, and no output schema, the description is incomplete. It lacks behavioral context, error information, and guidance on proper usage, leaving significant gaps for an AI agent to operate effectively.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100%, providing detailed documentation for all 5 parameters. The description adds minimal value beyond the schema by listing icon, cover, and archive/restore as capabilities, but doesn't explain parameter interactions or usage nuances. Baseline 3 is appropriate when schema does heavy lifting.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the verb 'Updates' and resource 'properties of a Notion page', with additional capabilities for icon, cover, and archive/restore operations. It distinguishes from siblings like notion_create_page (creation) and notion_retrieve_page (reading), though not explicitly named.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

No guidance on when to use this tool versus alternatives is provided. The description mentions what it can do but doesn't specify prerequisites, constraints, or differentiate from sibling tools like notion_retrieve_page_property for property-specific operations.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

Related Tools

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

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