Skip to main content
Glama

create_site

Add a website to the ESA MCP Server by specifying domain name, coverage location, DNS setup, and instance ID, ensuring compliance with regional requirements like ICP filing for Chinese mainland coverage.

Instructions

Adds a website. Make sure that you have an available plan before you add a website. Make sure that your website domain name has an ICP filing if the location you want to specify covers the Chinese mainland.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
siteNameYesThe website name.
coverageYesThe service location. Valid values: - domestic: the Chinese mainland - global: global - overseas: outside the Chinese mainland
accessTypeYesThe DNS setup. Valid values: - NS; - CNAME
instanceIdYesThe instance ID, which can be obtained by calling the [ListUserRatePlanInstances] operation. Specify at least one of the instance ID and website ID. If you specify both of them, the instance ID is used.
resourceGroupIdNoThe ID of the resource group. If you leave this parameter empty, the system uses the default resource group ID.

Implementation Reference

  • MCP tool handler function for 'create_site'. Extracts tool call arguments and invokes the underlying API service, returning the JSON response.
    export const create_site = async (request: CallToolRequest) => {
      const res = await api.createSite(
        request.params.arguments as CreateSiteRequest,
      );
    
      return {
        content: [{ type: 'text', text: JSON.stringify(res) }],
        success: true,
      };
    };
  • Tool schema for 'create_site' defining name, description, input schema with properties like siteName, coverage, accessType, instanceId (required), and annotations.
    export const CREATE_SITE_TOOL: Tool = {
      name: 'create_site',
      description:
        'Adds a website. Make sure that you have an available plan before you add a website. Make sure that your website domain name has an ICP filing if the location you want to specify covers the Chinese mainland.',
      inputSchema: {
        type: 'object',
        properties: {
          siteName: {
            type: 'string',
            description: 'The website name.',
            examples: ['example.com'],
          },
          coverage: {
            type: 'string',
            description:
              'The service location. Valid values:\n- domestic: the Chinese mainland\n- global: global\n- overseas: outside the Chinese mainland',
            enum: ['global', 'domestic', 'overseas'],
            examples: ['domestic'],
          },
          accessType: {
            type: 'string',
            description: 'The DNS setup. Valid values:\n- NS;\n- CNAME',
            enum: ['NS', 'CNAME'],
            examples: ['NS'],
          },
          instanceId: {
            type: 'string',
            description:
              'The instance ID, which can be obtained by calling the [ListUserRatePlanInstances] operation. Specify at least one of the instance ID and website ID. If you specify both of them, the instance ID is used.',
            examples: ['dbaudit-cn-nwy349jdb03'],
          },
          resourceGroupId: {
            type: 'string',
            description:
              'The ID of the resource group. If you leave this parameter empty, the system uses the default resource group ID.',
            examples: ['rg-acfmw4znnok****'],
          },
        },
        required: ['siteName', 'coverage', 'accessType', 'instanceId'],
        annotations: {
          readOnlyHint: false,
          destructiveHint: false,
          idempotentHint: false,
          openWorldHint: false,
        },
      },
    };
  • Helper method in API service client that wraps the Alibaba Cloud ESA client's createSite API call, handling request construction and runtime options.
    createSite(params: CreateSiteRequest) {
      const request = new CreateSiteRequest(params);
      return this.callApi(
        this.client.createSite.bind(this.client) as ApiMethod<
          CreateSiteRequest,
          CreateSiteResponse
        >,
        request,
      );
    }
  • Registration of all ESA tool handlers, including 'create_site', in the esaHandlers object used for MCP tool dispatching.
    export const esaHandlers: ToolHandlers = {
      site_active_list,
      site_match,
      site_route_list,
      site_record_list,
      routine_create,
      routine_code_commit,
      routine_delete,
      routine_list,
      routine_get,
      routine_code_deploy,
      routine_route_list,
      deployment_delete,
      route_create,
      route_delete,
      route_update,
      route_get,
      er_record_create,
      er_record_delete,
      er_record_list,
      html_deploy,
      create_site,
      update_site_pause,
      get_site_pause,
      create_site_mx_record,
      create_site_ns_record,
      create_site_txt_record,
      create_site_cname_record,
      create_site_a_or_aaaa_record,
      update_record,
      list_records,
      get_record,
      delete_record,
      update_ipv6,
      get_ipv6,
      update_managed_transform,
      get_managed_transform,
      set_certificate,
      apply_certificate,
      get_certificate,
      delete_certificate,
      list_certificates,
      get_certificate_quota,
      list_sites,
    };
Behavior3/5

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

No annotations are provided, so the description carries the full burden. It mentions important behavioral constraints (plan availability and ICP filing requirements), which adds value beyond basic functionality. However, it doesn't disclose other potential behavioral traits like error conditions, response format, whether the operation is idempotent, or what happens on failure.

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 concise with two sentences that both provide valuable information. The first sentence states the core purpose, and the second adds crucial prerequisites. There's no wasted text, though it could be slightly more structured with bullet points for the prerequisites.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a creation tool with no annotations and no output schema, the description provides adequate context about prerequisites but lacks information about what happens after creation (e.g., what is returned, whether the site becomes immediately active, error handling). Given the complexity of website creation with location-specific requirements, more completeness would be beneficial.

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?

With 100% schema description coverage, the input schema already documents all parameters thoroughly. The description doesn't add any parameter-specific information beyond what's in the schema, so it meets the baseline of 3 where the schema does the heavy lifting.

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 ('Adds a website') and resource ('a website'), making the purpose unambiguous. However, it doesn't differentiate this tool from sibling tools like 'create_site_cname_record' or 'create_site_ns_record' which also create site-related resources, so it doesn't achieve full sibling differentiation.

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 provides clear contextual prerequisites ('Make sure that you have an available plan' and 'Make sure that your website domain name has an ICP filing if the location... covers the Chinese mainland'), which effectively guide when to use this tool. However, it doesn't explicitly mention when NOT to use it or name specific alternative tools for different scenarios.

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

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/aliyun/mcp-server-esa'

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