get_page
Retrieve detailed information about a specific Notion page by its ID, including properties, timestamps, and archive status.
Instructions
Retrieves detailed information about a specific Notion page (database record) by its ID. Returns all properties (fields), creation time, last edited time, archive status, and more.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| pageId | Yes | The ID of the Notion page to retrieve (32 or 36 character UUID format). Example: "123e4567-e89b-12d3-a456-426614174000" |
Implementation Reference
- Executes the 'get_page' MCP tool: retrieves the page using GetPageUseCase, formats response as JSON with id, properties, timestamps, and archived status, or returns 'Page not found' if null.private async handleGetPage(args: any) { const result = await this.dependencies.getPageUseCase.execute({ pageId: args.pageId, }); if (!result) { return { content: [ { type: 'text' as const, text: 'Page not found', }, ], }; } return { content: [ { type: 'text' as const, text: JSON.stringify( { id: result.id.toString(), properties: result.properties, createdTime: result.createdTime, lastEditedTime: result.lastEditedTime, archived: result.archived, }, null, 2 ), }, ], }; }
- src/presentation/mcp/MCPServer.ts:125-138 (registration)Registers the 'get_page' tool with the MCP server via getTools(), providing name, detailed description, and input schema requiring 'pageId'.{ name: 'get_page', description: 'Retrieves detailed information about a specific Notion page (database record) by its ID. Returns all properties (fields), creation time, last edited time, archive status, and more.', inputSchema: { type: 'object', properties: { pageId: { type: 'string', description: 'The ID of the Notion page to retrieve (32 or 36 character UUID format). Example: "123e4567-e89b-12d3-a456-426614174000"', }, }, required: ['pageId'], }, },
- Input schema definition for the 'get_page' tool: object with required 'pageId' string property.inputSchema: { type: 'object', properties: { pageId: { type: 'string', description: 'The ID of the Notion page to retrieve (32 or 36 character UUID format). Example: "123e4567-e89b-12d3-a456-426614174000"', }, }, required: ['pageId'], },
- Business logic helper: GetPageUseCase executes retrieval of Page by ID via repository.export class GetPageUseCase { constructor(private readonly pageRepository: IPageRepository) {} async execute(input: GetPageInput): Promise<Page | null> { const pageId = new PageId(input.pageId); return await this.pageRepository.findById(pageId); } }