Skip to main content
Glama
aliyun

Alibaba Cloud FC MCP Server

Official
by aliyun

list-functions

Retrieve a filtered list of Alibaba Cloud Function Compute functions by region, name prefix, tags, or runtime to manage serverless deployments efficiently.

Instructions

获取函数计算的函数列表,只返回函数名称与部分函数信息,不返回所有函数信息。如果需要获取所有函数信息,请使用get-function工具

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
prefixNo函数名称前缀,用于过滤函数列表
nextTokenNo函数列表的下一页token,用于分页查询函数列表。第一页不需要提供
limitNo函数列表的返回数量上限,默认50,最大100
tagsNo函数标签,用于过滤函数列表,只返回包含所有标签的函数
runtimeNo函数运行时,用于过滤函数列表,只返回指定运行时的函数

Implementation Reference

  • src/index.ts:586-606 (registration)
    Registration of the 'list-functions' MCP tool using server.tool(). Includes tool name, Chinese description, Zod input schema (region required, optional prefix/nextToken/limit/tags/runtime), and inline async handler function.
    server.tool(
        "list-functions",
        "获取函数计算的函数列表,只返回函数名称与部分函数信息,不返回所有函数信息。如果需要获取所有函数信息,请使用get-function工具",
        {
            region: regionSchema,
            prefix: listFunctionsPrefixSchema.optional(),
            nextToken: listFunctionsNextTokenSchema.optional(),
            limit: z.number().describe("函数列表的返回数量上限,默认50,最大100").min(1).max(100).default(50),
            tags: functionTagSchema.describe("函数标签,用于过滤函数列表,只返回包含所有标签的函数").optional(),
            runtime: z.string().describe("函数运行时,用于过滤函数列表,只返回指定运行时的函数").optional(),
        },
        async (args) => {
            const { region } = args;
            const fcClient = createFcClient(region);
            const listFunctionsRequest = new ListFunctionsRequest({
                ...args
            });
            const functions = await fcClient.listFunctions(listFunctionsRequest);
            return { content: [{ type: "text", text: `获取函数列表: ${JSON.stringify(functions)}` }] };
        }
    )
  • Inline handler for 'list-functions' tool. Extracts region from args, creates FC client using createFcClient, builds ListFunctionsRequest with spread args, calls SDK listFunctions API, returns result as JSON-formatted text content.
        async (args) => {
            const { region } = args;
            const fcClient = createFcClient(region);
            const listFunctionsRequest = new ListFunctionsRequest({
                ...args
            });
            const functions = await fcClient.listFunctions(listFunctionsRequest);
            return { content: [{ type: "text", text: `获取函数列表: ${JSON.stringify(functions)}` }] };
        }
    )
  • Input schema for 'list-functions' tool defined inline with Zod, using imported schemas for region/prefix/nextToken/tags and custom z.number() for limit, z.string() for runtime.
    {
        region: regionSchema,
        prefix: listFunctionsPrefixSchema.optional(),
        nextToken: listFunctionsNextTokenSchema.optional(),
        limit: z.number().describe("函数列表的返回数量上限,默认50,最大100").min(1).max(100).default(50),
        tags: functionTagSchema.describe("函数标签,用于过滤函数列表,只返回包含所有标签的函数").optional(),
        runtime: z.string().describe("函数运行时,用于过滤函数列表,只返回指定运行时的函数").optional(),
    },
  • Zod schema definition for 'region' parameter used in 'list-functions' 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");
  • Helper function createFcClient used by the handler to instantiate the Alibaba Cloud Function Compute (FC) v3 client for the specified region.
    export function createFcClient(regionId: string) {
      const config = new $OpenApi.Config({
        credential: getCredentialClient(),
        endpoint: `fcv3.${regionId}.aliyuncs.com`,
      });
      return new FCClient(config);
    }
Behavior3/5

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

With no annotations provided, the description carries full burden. It describes the limited return scope ('只返回函数名称与部分函数信息' - returns only names and partial info) which is valuable behavioral context. However, it doesn't mention pagination behavior (implied by nextToken parameter), rate limits, authentication requirements, 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 perfectly concise with two sentences that each earn their place. The first sentence states the purpose and scope, the second provides clear usage guidance. No wasted words or redundant information.

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

Completeness4/5

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

For a list operation with no annotations and no output schema, the description provides good context about what information is returned and when to use it versus alternatives. However, it doesn't describe the output format or structure, which would be helpful given the absence of an output schema. The parameter documentation is complete in the schema.

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 fully documents all 6 parameters. The description doesn't add any parameter-specific information beyond what's in the schema. The baseline score of 3 is appropriate when the schema does all the parameter documentation work.

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 action ('获取函数计算的函数列表' - get function list), resource ('函数计算' - function compute), and scope ('只返回函数名称与部分函数信息' - returns only function names and partial information). It distinguishes from sibling 'get-function' by specifying this tool returns limited information while get-function returns all information.

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

Usage Guidelines5/5

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

The description explicitly provides when to use this tool ('获取函数计算的函数列表' - for listing functions) and when to use an alternative ('如果需要获取所有函数信息,请使用get-function工具' - use get-function for complete function information). This gives clear 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