Skip to main content
Glama
awkoy

notion-mcp-server

restore_page

Restores archived Notion pages using the specified page ID. Integrates with Notion MCP Server to enable AI assistants to manage page recovery efficiently.

Instructions

Restore a previously archived Notion page

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
pageIdYesThe ID of the page to restore

Implementation Reference

  • The core handler function for the restore_page action. It calls the Notion API to update the page's archived status to false and returns a success message.
    export async function restorePage(
      params: RestorePageParams
    ): Promise<CallToolResult> {
      try {
        const response = await notion.pages.update({
          page_id: params.pageId,
          archived: false,
        });
    
        return {
          content: [
            {
              type: "text",
              text: `Page restored successfully: ${response.id}`,
            },
          ],
        };
      } catch (error) {
        return handleNotionError(error);
      }
    }
  • Zod schema defining the input parameters for the restore_page operation (requires pageId).
    export const RESTORE_PAGE_SCHEMA = {
      pageId: z.string().describe("The ID of the page to restore"),
    };
  • Registration of the 'notion_pages' tool, which includes the 'restore_page' action as part of its discriminated union schema and handler.
      "notion_pages",
      "Perform various page operations (create, archive, restore, search, update)",
      PAGES_OPERATION_SCHEMA,
      registerPagesOperationTool
    );
  • Dispatch case in the registerPagesOperationTool handler that routes 'restore_page' action to the restorePage implementation.
    case "restore_page":
      return restorePage(params.payload.params);
  • Part of the PAGES_OPERATION_SCHEMA discriminated union that defines the structure for the 'restore_page' action including its params schema.
    z.object({
      action: z
        .literal("restore_page")
        .describe("Use this action to restore a previously archived page."),
      params: z.object(RESTORE_PAGE_SCHEMA),
    }),
Behavior2/5

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

With no annotations provided, the description carries full burden for behavioral disclosure. While 'restore' implies a mutation operation, it doesn't specify what happens to the page content, permissions, or metadata during restoration, nor does it mention authentication requirements, rate limits, or potential side effects.

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 a single, efficient sentence that states exactly what the tool does without any unnecessary words. It's perfectly front-loaded and wastes no space.

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 no annotations and no output schema, the description is insufficient. It doesn't explain what 'restore' actually means operationally, what gets returned, or how this affects the page's state. The context signals show minimal complexity, but the description should provide more behavioral context.

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?

The schema has 100% description coverage, with the single parameter 'pageId' clearly documented. The description doesn't add any additional semantic context about the parameter beyond what's already in the schema, so it meets the baseline for high schema coverage.

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 ('restore') and resource ('previously archived Notion page'), making the purpose immediately understandable. However, it doesn't explicitly differentiate from sibling tools like 'archive_page' beyond the obvious inverse relationship, which keeps it from a perfect score.

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?

The description provides no guidance on when to use this tool versus alternatives or prerequisites. It doesn't mention if the page must be archived first, if there are limitations on what can be restored, or how this relates to other page management tools in the sibling list.

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

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