Skip to main content
Glama
TencentEdgeOne

EdgeOne Pages MCP

Official

deploy_html

Publish HTML content and obtain a public URL using the EdgeOne Pages MCP. Simplify content deployment by uploading markup and accessing it instantly via a generated link.

Instructions

Deploy HTML content to EdgeOne Pages, return the public URL

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
valueYesProvide the full HTML markup you wish to publish. After deployment, the system will generate and return a public URL where your content can be accessed.

Implementation Reference

  • index.ts:35-60 (registration)
    Registers the 'deploy_html' MCP tool, including description, input schema for HTML 'value', and thin wrapper handler that calls deployHtmlToEdgeOne and formats response.
    server.tool(
      'deploy_html',
      'Deploy HTML content to EdgeOne Pages, return the public URL',
      {
        value: z.string().describe(
          `Provide the full HTML markup you wish to publish.
    After deployment, the system will generate and return a public URL where your content can be accessed.`
        ),
      },
      async ({ value }) => {
        try {
          const result = await deployHtmlToEdgeOne(value);
    
          return {
            content: [
              {
                type: 'text' as const,
                text: result,
              },
            ],
          };
        } catch (e) {
          return handleUncaughtError(e);
        }
      }
    );
  • Zod input schema for the tool: 'value' parameter as string containing full HTML markup.
      {
        value: z.string().describe(
          `Provide the full HTML markup you wish to publish.
    After deployment, the system will generate and return a public URL where your content can be accessed.`
        ),
      },
  • Primary exported handler function for deploying HTML: retrieves base URL, invokes core deployHtml function, returns the public deployment URL.
    export const deployHtmlToEdgeOne = async (html: string): Promise<string> => {
      try {
        const baseUrl = await getBaseUrl();
        const url = await deployHtml(html, baseUrl);
        return url;
      } catch (e) {
        console.error('Error deploying HTML:', e);
        throw e;
      }
    };
  • Core HTTP POST handler: sends HTML payload to EdgeOne Pages API endpoint with installation ID, extracts and returns the generated URL.
    async function deployHtml(value: string, baseUrl: string): Promise<string> {
      const res = await fetch(baseUrl, {
        method: 'POST',
        headers: {
          'Content-Type': 'application/json',
          'X-Installation-ID': installationId,
        },
        body: JSON.stringify({ value }),
      });
    
      if (!res.ok) {
        throw new Error(`[deployHtml] HTTP error: ${res.status} ${res.statusText}`);
      }
    
      const { url } = await res.json();
      return url;
    }
  • Helper function to fetch the current EdgeOne Pages deployment base URL from configuration endpoint.
    async function getBaseUrl(): Promise<string> {
      const res = await fetch('https://mcp.edgeone.site/get_base_url');
      if (!res.ok) {
        throw new Error(`[getBaseUrl] HTTP error: ${res.status} ${res.statusText}`);
      }
      const data = await res.json();
      return data.baseUrl;
    }
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 states the tool deploys HTML content and returns a public URL, but does not cover critical aspects like authentication requirements, rate limits, whether the deployment is permanent or temporary, error handling, or what happens to previous deployments. This leaves significant gaps in understanding the tool's behavior.

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 key action and outcome without any wasted words. It is appropriately sized for a tool with one parameter and clear functionality, making it easy for an agent to parse quickly.

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 lack of annotations and output schema, the description is incomplete for a deployment tool. It does not explain the return value format beyond 'public URL', nor does it address potential errors, side effects, or integration details. For a tool that modifies external resources, more context is needed to ensure safe and correct usage.

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 input schema has 100% description coverage, with the parameter 'value' clearly documented as 'full HTML markup' for publishing. The description adds no additional parameter semantics beyond what the schema provides, so it meets the baseline of 3 for adequate but not enhanced 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 action ('Deploy HTML content') and target resource ('to EdgeOne Pages'), with a specific outcome ('return the public URL'). It distinguishes from the sibling tool 'deploy_folder_or_zip' by specifying HTML content deployment rather than folder/zip deployment, though it could be more explicit about the distinction.

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 the sibling 'deploy_folder_or_zip' or other alternatives. It mentions the outcome but lacks context about prerequisites, limitations, or typical use cases, leaving the agent without explicit usage instructions.

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/TencentEdgeOne/edgeone-pages-mcp'

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