update-database-entry
Modify specific properties of a Notion database entry by providing the page ID and updated property values, ensuring data accuracy and consistency in your workspace.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| pageId | Yes | ||
| properties | Yes |
Implementation Reference
- src/index.ts:426-449 (handler)Handler function that updates a Notion database entry by calling notion.pages.update with the provided pageId and properties.async ({ pageId, properties }) => { try { // Update the page properties (database entry) const response = await notion.pages.update({ page_id: pageId, properties: properties }); return { content: [{ type: "text", text: `Database entry updated successfully!\nID: ${response.id}` }] }; } catch (error: any) { return { content: [{ type: "text", text: `Error updating database entry: ${error.message}` }], isError: true }; } }
- src/index.ts:422-425 (schema)Zod schema defining the input parameters: pageId (string) and properties (record of any).{ pageId: z.string(), properties: z.record(z.any()) },
- src/index.ts:420-421 (registration)Registration of the 'update-database-entry' tool using server.tool method.server.tool( "update-database-entry",