Skip to main content
Glama

notion_retrieve_page

Retrieve specific properties of a Notion page by its ID using the Notion API. Filter the response to include only selected properties for efficient data management.

Instructions

Retrieves a Notion page by ID. Returns page properties, not page content.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
filter_propertiesNoOptional list of property IDs to filter the response
page_idYesThe ID of the page to retrieve

Implementation Reference

  • The handleRetrievePageTool function that executes the core logic of the 'notion_retrieve_page' tool by retrieving the page via NotionClient.retrievePage and returning formatted content or error.
    export async function handleRetrievePageTool(client: NotionClient, args: any) {
        try {
            const retrieveArgs: RetrievePageArgs = {
                page_id: args.page_id,
                ...(args.filter_properties && { filter_properties: args.filter_properties })
            };
    
            const response = await client.retrievePage(retrieveArgs);
            
            return {
                content: [
                    {
                        type: 'text',
                        text: `Retrieved page: ${response.id}\n` +
                              `URL: ${'url' in response ? response.url : 'N/A'}\n` +
                              `Created: ${'created_time' in response ? response.created_time : 'N/A'}\n` +
                              `Last edited: ${'last_edited_time' in response ? response.last_edited_time : 'N/A'}\n` +
                              `Properties: ${'properties' in response ? JSON.stringify(response.properties, null, 2) : 'N/A'}`
                    }
                ]
            };
        } catch (error: any) {
            return {
                content: [
                    {
                        type: 'text',
                        text: `Error retrieving page: ${error.message || 'Unknown error'}`
                    }
                ],
                isError: true
            };
        }
    }
  • The tool definition including the input schema for validating arguments like page_id and optional filter_properties.
    export const retrievePageToolDefinition: Tool = {
        name: 'notion_retrieve_page',
        description: 'Retrieves a Notion page by ID. Returns page properties, not page content.',
        inputSchema: {
            type: 'object',
            properties: {
                page_id: {
                    type: 'string',
                    description: 'The ID of the page to retrieve'
                },
                filter_properties: {
                    type: 'array',
                    items: {
                        type: 'string'
                    },
                    description: 'Optional list of property IDs to filter the response'
                }
            },
            required: ['page_id']
        }
    };
  • src/server.ts:43-50 (registration)
    Registration of the 'notion_retrieve_page' tool definition (as retrievePageToolDefinition) in the ListTools request handler.
    this.server.setRequestHandler(ListToolsRequestSchema, async () => ({
        tools: [
            createPageToolDefinition,
            retrievePageToolDefinition,
            updatePageToolDefinition,
            retrievePagePropertyToolDefinition
        ],
    }));
  • src/server.ts:52-75 (registration)
    Dispatch registration in the CallTool request handler switch statement, mapping 'notion_retrieve_page' to handleRetrievePageTool.
        this.server.setRequestHandler(CallToolRequestSchema, async (request) => {
            const { name, arguments: args } = request.params;
    
            switch (name) {
                case 'notion_create_page':
                    return handleCreatePageTool(this.client, args);
                
                case 'notion_retrieve_page':
                    return handleRetrievePageTool(this.client, args);
                
                case 'notion_update_page':
                    return handleUpdatePageTool(this.client, args);
                
                case 'notion_retrieve_page_property':
                    return handleRetrievePagePropertyTool(this.client, args);
                
                default:
                    throw new McpError(
                        ErrorCode.MethodNotFound,
                        `Unknown tool: ${name}`
                    );
            }
        });
    }
Behavior3/5

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

With no annotations provided, the description carries the full burden. It discloses that the tool returns page properties rather than content, which is useful behavioral context. However, it doesn't mention authentication needs, rate limits, error handling, or whether the operation is read-only (implied by 'retrieves' but not explicit).

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

Conciseness5/5

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

The description is two concise sentences with zero waste. The first sentence states the core purpose, and the second clarifies the return scope, both earning their place by adding value beyond the tool name.

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

Completeness4/5

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

For a simple retrieval tool with 100% schema coverage and no output schema, the description is reasonably complete. It clarifies the return type (properties vs. content), which addresses a key ambiguity. However, without annotations or output schema, it could benefit from mentioning authentication or error scenarios.

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%, so the schema already documents both parameters (page_id and filter_properties). The description doesn't add any parameter-specific details beyond what the schema provides, such as format examples for page_id or use cases for filter_properties.

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

Purpose5/5

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

The description clearly states the specific action ('Retrieves'), target resource ('a Notion page by ID'), and scope ('Returns page properties, not page content'). It distinguishes from siblings by specifying it retrieves the page itself rather than creating, updating, or retrieving specific properties.

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

Usage Guidelines3/5

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

The description implies usage when needing page properties by ID, but doesn't explicitly state when to use this tool versus alternatives like notion_retrieve_page_property for specific properties or notion_update_page for modifications. No exclusions or prerequisites are mentioned.

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