Skip to main content
Glama
aguaitech

Elementor MCP Server

by aguaitech

delete_page

Remove a specific page from WordPress using its ID, with an option to force deletion bypassing the trash. Returns a boolean indicating success.

Instructions

Deletes a specific page from WordPress, it will return a boolean value to indicate if the deletion was successful.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
forceNoWhether to bypass the trash and force deletion. Defaults to false.
pageIdYesThe ID of the page to delete.

Implementation Reference

  • The inline handler function for the MCP 'delete_page' tool. It invokes the deletePage helper from wp-api.js and returns a success response.
    async (input) => {
      // Handler
      await deletePage(input.pageId, input.force);
      return {
        content: [
          {
            type: "text",
            text: "true",
          },
        ],
      };
    }
  • Zod input schema defining parameters for the delete_page tool: pageId (required number) and force (optional boolean, default false).
    {
      // Input Schema: Use plain object with Zod types
      pageId: z
        .number()
        .int()
        .positive()
        .describe("The ID of the page to delete."),
      force: z
        .boolean()
        .optional()
        .default(false)
        .describe(
          "Whether to bypass the trash and force deletion. Defaults to false."
        ),
    },
  • src/index.js:226-256 (registration)
    Registration of the 'delete_page' tool on the MCP server using server.tool(), including description, input schema, and handler function.
    server.tool(
      "delete_page",
      "Deletes a specific page from WordPress, it will return a boolean value to indicate if the deletion was successful.",
      {
        // Input Schema: Use plain object with Zod types
        pageId: z
          .number()
          .int()
          .positive()
          .describe("The ID of the page to delete."),
        force: z
          .boolean()
          .optional()
          .default(false)
          .describe(
            "Whether to bypass the trash and force deletion. Defaults to false."
          ),
      },
      async (input) => {
        // Handler
        await deletePage(input.pageId, input.force);
        return {
          content: [
            {
              type: "text",
              text: "true",
            },
          ],
        };
      }
    );
  • Helper function that performs the actual page deletion via WordPress REST API delete endpoint, called by the tool handler.
    async function deletePage(pageId, force = true) {
        const client = getApiClient();
        const response = await client.delete(`/wp-json/wp/v2/pages/${pageId}?force=${force}`);
        // WP delete usually returns the object before deletion or a specific structure
        return response.data;
    }
Behavior2/5

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

With no annotations provided, the description carries the full burden of behavioral disclosure. It mentions the return value (a boolean indicating success) but lacks critical details such as permissions required, whether deletion is reversible (e.g., via trash), error conditions, or side effects. This is insufficient for a destructive operation.

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

Conciseness4/5

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

The description is appropriately sized with two sentences that are front-loaded with the core action. It avoids unnecessary fluff, though it could be slightly more structured by explicitly separating behavioral details from purpose.

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?

Given the complexity of a destructive operation with no annotations and no output schema, the description is incomplete. It fails to address key aspects like authentication needs, error handling, or the impact of the force parameter, leaving significant gaps for the 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 schema description coverage is 100%, so the schema already documents both parameters (pageId and force) thoroughly. The description adds no additional meaning beyond what the schema provides, such as explaining the implications of the force parameter or how pageId is obtained. Baseline 3 is appropriate when the schema does the heavy lifting.

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 ('Deletes') and resource ('a specific page from WordPress'), distinguishing it from sibling tools like create_page, update_page, get_page, etc. It directly addresses what the tool does without being vague or tautological.

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. It does not mention prerequisites, when deletion is appropriate, or how it differs from other tools like update_page or create_page. This lack of context leaves the agent without usage direction.

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/aguaitech/Elementor-MCP'

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