Skip to main content
Glama
RadiumGu

Alibaba Cloud Operations MCP Server

by RadiumGu

describe_vpcs

Retrieve and list Virtual Private Cloud (VPC) configurations in Alibaba Cloud to manage network resources and monitor infrastructure.

Instructions

查询VPC列表

Args:
    region: 区域ID,如cn-beijing

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
regionNocn-beijing

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Implementation Reference

  • The handler function decorated with @app.tool() that implements the describe_vpcs tool. It dynamically imports common_api_tools and searches for a tool function containing 'vpc' in its name to delegate the RegionId call, or returns an availability message.
    @app.tool()
    def describe_vpcs(region: str = "cn-beijing") -> str:
        """查询VPC列表
        
        Args:
            region: 区域ID,如cn-beijing
        """
        try:
            sys.path.insert(0, os.path.join(os.path.dirname(__file__), 'alibaba_cloud_ops_mcp_server'))
            from tools import common_api_tools
            
            for tool_func in common_api_tools.tools:
                if hasattr(tool_func, '__name__') and 'vpc' in tool_func.__name__.lower():
                    result = tool_func(RegionId=region)
                    return str(result)
            
            return f"VPC查询功能可用,查询region: {region}"
        except Exception as e:
            return f"VPC查询失败: {str(e)}"
  • Configuration listing the DescribeVpcs API under the Vpc service, likely used to dynamically generate tool functions in api_tools.create_api_tools.
    'Vpc': [
        'DescribeVpcs',
        'DescribeVSwitches'
  • Calls create_api_tools with the config to register dynamic API tools, including VPC_DESCRIBE_VPCS (note: different name from describe_vpcs).
    api_tools.create_api_tools(mcp, config)
  • Function that dynamically creates and registers MCP tools for each API in the config, naming them like 'VPC_DESCRIBE_VPCS'. The describe_vpcs might be a wrapper or alias.
    def create_api_tools(mcp: FastMCP, config:dict):
        for service_code, apis in config.items():
            for api_name in apis:
                _create_and_decorate_tool(mcp, service_code, api_name)
Behavior2/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 states it queries a list, implying a read-only operation, but doesn't disclose behavioral traits such as whether it requires authentication, has rate limits, returns paginated results, or what the output format is. The description is minimal and lacks critical operational context.

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 brief and front-loaded with the main purpose, followed by parameter details in a structured 'Args:' section. It avoids unnecessary words, but the lack of broader context or guidelines means it might be too terse for optimal agent understanding.

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?

Given the tool has an output schema (which handles return values), 1 parameter with low schema coverage, and no annotations, the description is minimally adequate. It covers the purpose and parameter example but misses usage guidelines and behavioral transparency, leaving gaps for a read operation in a cloud management context.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The description adds meaningful context for the single parameter 'region' by providing an example value ('cn-beijing'), which clarifies the expected format beyond the schema's generic 'string' type. With 0% schema description coverage and only 1 parameter, this compensates well, though it could specify if other regions are valid or if it's optional.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose3/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description states '查询VPC列表' which translates to 'Query VPC list', providing a clear verb ('query') and resource ('VPC list'). However, it doesn't distinguish this tool from sibling tools like 'describe_ecs_instances' or 'describe_rds_instances' beyond the resource type, making it somewhat generic within the context of this server.

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 alternatives. It doesn't mention prerequisites, context (e.g., for cloud infrastructure management), or compare it to related tools like 'describe_vswitches' (which might list subnets within VPCs). Usage is implied by the action but not explicitly stated.

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/RadiumGu/alicloud-ops-mcp'

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