Skip to main content
Glama
aliyun

Alibaba Cloud FC MCP Server

Official
by aliyun

delete-custom-domain-config

Remove custom domain routing configurations from Alibaba Cloud Function Compute. This tool deletes the domain-to-function mapping while requiring manual CNAME record cleanup in DNS settings.

Instructions

删除函数计算的域名路由配置,CNAME记录不会被删除,需要手动删除CNAME记录

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
regionNo部署的区域,当前可选的区域是cn-hangzhou, cn-shanghai, cn-beijing, cn-shenzhen, cn-hongkong, ap-southeast-1, ap-southeast-2, ap-southeast-3, ap-southeast-5, ap-northeast-1, eu-central-1, eu-west-1, us-west-1, us-east-1, ap-south-1, me-east-1, cn-chengdu, cn-wulanchabu, cn-guangzhou,默认是cn-hangzhoucn-hangzhou
domainYes域名,例如example.com,域名不能带有'https://'或'http://'等协议内容

Implementation Reference

  • src/index.ts:755-781 (registration)
    Registration of the delete-custom-domain-config tool. Includes the tool name, description, input schema (region and domain), and the complete handler function that validates credentials, creates FC client, and calls deleteCustomDomain.
    server.tool(
        "delete-custom-domain-config",
        "删除函数计算的域名路由配置,CNAME记录不会被删除,需要手动删除CNAME记录",
        {
            region: regionSchema,
            domain: domainSchema,
        },
        async (args) => {
            const { region, domain } = args;
            const accessKeyId = process.env.ALIBABA_CLOUD_ACCESS_KEY_ID;
            const accessKeySecret = process.env.ALIBABA_CLOUD_ACCESS_KEY_SECRET;
            if (!accessKeyId || !accessKeySecret) {
                return { isError: true, content: [{ type: "text", text: `执行失败,请设置ALIBABA_CLOUD_ACCESS_KEY_ID, ALIBABA_CLOUD_ACCESS_KEY_SECRET, ALIBABA_CLOUD_SECURITY_TOKEN环境变量` }] };
            }
            const accountId = await getAccountId();
            if (!accountId) {
                return { isError: true, content: [{ type: "text", text: `执行失败,获取accountId异常` }] };
            }
            const fcClient = createFcClient(region);
            try {
                const result = await fcClient.deleteCustomDomain(domain);
                return { content: [{ type: "text", text: `删除域名路由配置成功。result: ${JSON.stringify(result)}` }] };
            } catch (error) {
                return { isError: true, content: [{ type: "text", text: `删除域名路由配置失败:${JSON.stringify(error as any)}` }] };
            }
        }
    )
  • Zod schema definition for the 'domain' input parameter used in the delete-custom-domain-config tool.
    export const domainSchema = z.string().describe("域名,例如example.com,域名不能带有'https://'或'http://'等协议内容");
  • Zod schema definition for the 'region' input parameter used in the delete-custom-domain-config tool.
    export const regionSchema = z.enum(['cn-hangzhou', 'cn-shanghai', 'cn-beijing', 'cn-shenzhen', 'cn-hongkong', 'ap-southeast-1', 'ap-southeast-2', 'ap-southeast-3', 'ap-southeast-5', 'ap-northeast-1', 'eu-central-1', 'eu-west-1', 'us-west-1', 'us-east-1', 'ap-south-1', 'me-east-1', 'cn-chengdu', 'cn-wulanchabu', 'cn-guangzhou'])
        .default('cn-hangzhou')
        .describe("部署的区域,当前可选的区域是cn-hangzhou, cn-shanghai, cn-beijing, cn-shenzhen, cn-hongkong, ap-southeast-1, ap-southeast-2, ap-southeast-3, ap-southeast-5, ap-northeast-1, eu-central-1, eu-west-1, us-west-1, us-east-1, ap-south-1, me-east-1, cn-chengdu, cn-wulanchabu, cn-guangzhou,默认是cn-hangzhou");
Behavior4/5

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

With no annotations provided, the description carries the full burden. It discloses that the tool deletes domain routing configurations and that CNAME records are not deleted automatically (requiring manual deletion), which adds important behavioral context beyond the basic delete operation. However, it does not mention potential side effects, permissions needed, or error conditions.

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 directly states the tool's action and a key behavioral note about CNAME records. It is front-loaded with the main purpose and avoids unnecessary words, making it highly concise and well-structured.

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 deletion tool with no annotations and no output schema, the description is adequate but has gaps. It covers the main action and a critical side effect (CNAME records not deleted), but lacks details on prerequisites, error handling, or what happens after deletion. Given the complexity and lack of structured data, it could be more complete.

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 already documents both parameters ('region' and 'domain') thoroughly. The description does not add any parameter-specific information beyond what the schema provides, such as examples or constraints not in the schema. Baseline 3 is appropriate when 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 ('删除' meaning delete) and resource ('函数计算的域名路由配置' meaning function compute domain routing configuration). It distinguishes from siblings by focusing on domain configuration deletion rather than function deletion or other operations, making the purpose unambiguous.

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

Usage Guidelines3/5

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

The description implies usage for deleting domain routing configurations in function compute, but does not explicitly state when to use this tool versus alternatives like 'update-custom-domain-config' or 'delete-function'. It mentions that CNAME records are not deleted automatically, which provides some context but not explicit guidance on tool selection.

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/alibabacloud-fc-mcp-server'

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