Skip to main content
Glama
awkoy

notion-mcp-server

archive_page

Archive (trash) a Notion page by providing its page ID. This tool integrates with the Notion MCP server to manage content removal efficiently and programmatically.

Instructions

Archive (trash) a Notion page

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
pageIdYesThe ID of the page to archive

Implementation Reference

  • The core handler function that executes the archiving of a Notion page using the Notion API by setting the page's archived property to true.
    export async function archivePage(
      params: ArchivePageParams
    ): Promise<CallToolResult> {
      try {
        const response = await notion.pages.update({
          page_id: params.pageId,
          archived: true,
        });
    
        return {
          content: [
            {
              type: "text",
              text: `Page archived successfully: ${response.id}`,
            },
          ],
        };
      } catch (error) {
        return handleNotionError(error);
      }
    }
  • Registers the 'notion_pages' MCP tool, which dispatches to 'archive_page' action handler among other page operations.
    server.tool(
      "notion_pages",
      "Perform various page operations (create, archive, restore, search, update)",
      PAGES_OPERATION_SCHEMA,
      registerPagesOperationTool
    );
  • Zod schema definition for the parameters required by the archive_page action: pageId (string).
    export const ARCHIVE_PAGE_SCHEMA = {
      pageId: z.string().describe("The ID of the page to archive"),
    };
  • Dispatches the 'archive_page' action call to the archivePage handler function within the notion_pages tool.
    case "archive_page":
      return archivePage(params.payload.params);
  • Part of the discriminated union schema for PAGES_OPERATION_SCHEMA that defines the 'archive_page' action variant.
      action: z
        .literal("archive_page")
        .describe(
          "Use this action to archive an existing page, making it inactive."
        ),
      params: z.object(ARCHIVE_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 but only states the action without disclosing behavioral traits. It doesn't mention permission requirements, whether the action is reversible (though 'archive' implies recoverability), rate limits, or what happens to child blocks. For a mutation tool with zero annotation coverage, this is insufficient.

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 with zero waste. It's front-loaded with the core action and resource, making it immediately understandable without unnecessary elaboration.

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 incomplete. It lacks information about permissions, reversibility, effects on child content, or response format, leaving significant gaps for an agent to understand the tool's behavior fully.

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 description adds no parameter semantics beyond what the schema already provides (100% coverage). The schema fully documents the single 'pageId' parameter, so the baseline score of 3 is appropriate as the description doesn't compensate but doesn't need to.

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 ('archive/trash') and target resource ('a Notion page'), distinguishing it from sibling tools like 'delete_block' or 'restore_page' which handle different operations on similar resources.

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

Usage Guidelines4/5

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

The description implies usage context by specifying 'archive (trash)', suggesting this is for removing pages to a recoverable state rather than permanent deletion. However, it doesn't explicitly state when to use this versus alternatives like 'delete_block' or 'restore_page' for undoing the action.

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