Skip to main content
Glama
aguaitech

Elementor MCP Server

by aguaitech

download_page_to_file

Download a WordPress page by its ID, including Elementor meta fields, and save it to a specified file path. Optionally, save only the _elementor_data field for targeted use.

Instructions

Downloads a specific page from WordPress by its ID, including meta fields like _elementor_data, and saves it to a file.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
filePathYesThe path to save the file to, have to be the absolute path.
onlyElementorDataNoWhether to only save the _elementor_data field to the file, defaults to false.
pageIdYesThe ID of the page to download.

Implementation Reference

  • The handler function that executes the download_page_to_file tool logic: retrieves page data via getPage and saves to file using fs.writeFileSync, optionally only Elementor data.
    async (input) => {
      const pageData = await getPage(input.pageId);
      if (input.onlyElementorData) {
        fs.writeFileSync(
          input.filePath,
          JSON.stringify(pageData.meta._elementor_data, null, 0)
        );
      } else {
        fs.writeFileSync(input.filePath, JSON.stringify(pageData, null, 0));
      }
      return {
        content: [{ type: "text", text: "true" }],
      };
    }
  • Input schema for download_page_to_file tool, defining parameters pageId, filePath, and optional onlyElementorData using Zod.
    {
      pageId: z
        .number()
        .int()
        .positive()
        .describe("The ID of the page to download."),
      filePath: z
        .string()
        .describe(
          "The path to save the file to, have to be the absolute path."
        ),
      onlyElementorData: z
        .boolean()
        .optional()
        .default(false)
        .describe(
          "Whether to only save the _elementor_data field to the file, defaults to false."
        ),
    },
  • src/index.js:97-133 (registration)
    Registration of the download_page_to_file tool using McpServer's server.tool method.
    server.tool(
      "download_page_to_file",
      "Downloads a specific page from WordPress by its ID, including meta fields like _elementor_data, and saves it to a file.",
      {
        pageId: z
          .number()
          .int()
          .positive()
          .describe("The ID of the page to download."),
        filePath: z
          .string()
          .describe(
            "The path to save the file to, have to be the absolute path."
          ),
        onlyElementorData: z
          .boolean()
          .optional()
          .default(false)
          .describe(
            "Whether to only save the _elementor_data field to the file, defaults to false."
          ),
      },
      async (input) => {
        const pageData = await getPage(input.pageId);
        if (input.onlyElementorData) {
          fs.writeFileSync(
            input.filePath,
            JSON.stringify(pageData.meta._elementor_data, null, 0)
          );
        } else {
          fs.writeFileSync(input.filePath, JSON.stringify(pageData, null, 0));
        }
        return {
          content: [{ type: "text", text: "true" }],
        };
      }
    );
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 basic action. It doesn't disclose critical behavioral traits like whether this requires write permissions to the file system, potential side effects (e.g., overwriting existing files), error handling, or format of the saved file (e.g., JSON, raw data). The mention of meta fields like _elementor_data adds some context but is insufficient for a mutation tool.

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 front-loads the core action and key details (downloading pages with meta fields to a file). Every word earns its place with no redundancy or 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 on permissions required, file system interactions, error scenarios, output format, or how the saved file is structured. While concise, it doesn't compensate for the missing structured data needed for safe and effective use.

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 fully documents all three parameters (pageId, filePath, onlyElementorData). The description adds marginal value by mentioning meta fields like _elementor_data, which relates to the onlyElementorData parameter, but doesn't provide additional syntax or format details beyond what the schema already specifies.

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 action ('Downloads'), target resource ('a specific page from WordPress'), and key functionality ('saves it to a file'), which distinguishes it from read-only siblings like get_page. However, it doesn't explicitly differentiate from update_page_from_file which also involves files, making it slightly less specific than ideal.

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?

No guidance is provided on when to use this tool versus alternatives like get_page (which retrieves page data without saving to file) or update_page_from_file (which might involve similar file operations). The description implies usage for downloading pages with meta fields, but lacks explicit when/when-not instructions or sibling comparisons.

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