Skip to main content
Glama

delete_page

Archive Notion pages to organize completed tasks and finished projects. Archived pages can be restored later for flexible content management.

Instructions

Deletes (archives) a Notion page (database record). In Notion, deletion is actually an archive operation and can be restored later. Use this to organize completed tasks, finished projects, etc.

Input Schema

NameRequiredDescriptionDefault
pageIdYesThe ID of the Notion page to delete (archive). Must be 32 or 36 character UUID format. Example: "123e4567-e89b-12d3-a456-426614174000"

Input Schema (JSON Schema)

{ "properties": { "pageId": { "description": "The ID of the Notion page to delete (archive). Must be 32 or 36 character UUID format. Example: \"123e4567-e89b-12d3-a456-426614174000\"", "type": "string" } }, "required": [ "pageId" ], "type": "object" }

Implementation Reference

  • MCP tool handler that executes the delete_page tool call by invoking DeletePageUseCase with the provided pageId and returns a success message.
    private async handleDeletePage(args: any) { await this.dependencies.deletePageUseCase.execute({ pageId: args.pageId, }); return { content: [ { type: 'text' as const, text: 'Page deleted successfully', }, ], }; }
  • Registers the 'delete_page' tool with the MCP SDK, defining its name, description, and input schema requiring a pageId.
    { name: 'delete_page', description: 'Deletes (archives) a Notion page (database record). In Notion, deletion is actually an archive operation and can be restored later. Use this to organize completed tasks, finished projects, etc.', inputSchema: { type: 'object', properties: { pageId: { type: 'string', description: 'The ID of the Notion page to delete (archive). Must be 32 or 36 character UUID format. Example: "123e4567-e89b-12d3-a456-426614174000"', }, }, required: ['pageId'], }, },
  • Input type definition used by DeletePageUseCase for validating the pageId parameter.
    export interface DeletePageInput { pageId: string; }
  • Use case class implementing the core deletion logic: constructs PageId value object and delegates deletion to the page repository.
    export class DeletePageUseCase { constructor(private readonly pageRepository: IPageRepository) {} async execute(input: DeletePageInput): Promise<void> { const pageId = new PageId(input.pageId); await this.pageRepository.delete(pageId); } }

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