Skip to main content
Glama
aliyun

AlibabaCloud MCP Server

Official
by aliyun

GetDiskTotalData

Retrieve total disk partition capacity metrics from AlibabaCloud ECS instances to monitor and manage storage resources effectively.

Instructions

获取磁盘分区总容量指标数据

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
InstanceIdsYesAlibabaCloud ECS instance ID List
RegionIdNoAlibabaCloud region IDcn-hangzhou

Implementation Reference

  • Handler function implementing GetDiskTotalData (named CMS_GetDiskTotalData) that fetches disk total capacity metrics from Alibaba Cloud CMS for specified ECS instances.
    def CMS_GetDiskTotalData(
        InstanceIds: List[str] = Field(description='AlibabaCloud ECS instance ID List'),
        RegionId: str = Field(description='AlibabaCloud region ID', default='cn-hangzhou')
    ):
        """获取磁盘分区总容量指标数据"""
        return _get_cms_metric_data(RegionId, InstanceIds, 'diskusage_total')
  • MCP server registration loop that adds all CMS tools including CMS_GetDiskTotalData to the FastMCP server instance.
    for tool in cms_tools.tools:
        mcp.tool(tool)
  • Core helper function that queries the CMS API for metric data (used by CMS_GetDiskTotalData with metric 'diskusage_total').
    def _get_cms_metric_data(region_id: str, instance_ids: List[str], metric_name: str):
        client = create_client(region_id)
        dimesion = []
        for instance_id in instance_ids:
            dimesion.append({
                'instanceId': instance_id
            })
        describe_metric_last_request = cms_20190101_models.DescribeMetricLastRequest(
            namespace='acs_ecs_dashboard',
            metric_name=metric_name,
            dimensions=json.dumps(dimesion),
        )
        describe_metric_last_resp = client.describe_metric_last(describe_metric_last_request)
        logger.info(f'CMS Tools response: {describe_metric_last_resp.body}')
        return describe_metric_last_resp.body.datapoints
  • Decorator that registers CMS_GetDiskTotalData into the cms_tools.tools list for later MCP inclusion.
    @tools.append
  • Helper function to create the Alibaba Cloud CMS client with region-specific endpoint.
    def create_client(region_id: str) -> cms20190101Client:
        config = create_config()
        config.endpoint = f'metrics.{region_id}.aliyuncs.com'
        return cms20190101Client(config)
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 of behavioral disclosure. It only states what data is retrieved ('get disk partition total capacity metric data') without mentioning any behavioral traits such as whether this is a read-only operation, potential rate limits, authentication needs, or what the output format might be. This leaves significant gaps for an AI agent to understand how to invoke it effectively.

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 a single, efficient sentence in Chinese that directly states the purpose without unnecessary words. It's appropriately sized for a simple data retrieval tool, though it could be more front-loaded with additional context if needed.

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 complexity of a data retrieval tool with no annotations and no output schema, the description is incomplete. It doesn't explain what the returned data looks like (e.g., format, units), how it's structured, or any limitations (e.g., time ranges, aggregation). This makes it inadequate for an AI agent to fully understand the tool's behavior and output.

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 description adds no meaning beyond what the input schema provides. With 100% schema description coverage, the schema already documents both parameters (InstanceIds and RegionId) clearly. The description doesn't explain how these parameters relate to retrieving disk total capacity data, 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.

Purpose3/5

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

The description '获取磁盘分区总容量指标数据' (Get disk partition total capacity metric data) states the verb ('get') and resource ('disk partition total capacity metric data'), but it's somewhat vague about what exactly is being retrieved. It doesn't clearly distinguish from sibling tools like GetDiskUsageData or GetDiskUsedData, which also deal with disk metrics but for different aspects (usage vs. used vs. total capacity).

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. With sibling tools like GetDiskUsageData and GetDiskUsedData, there's no indication of when total capacity data is needed compared to usage or used data, nor any prerequisites or exclusions mentioned in the description.

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/aliyun/alibaba-cloud-ops-mcp-server'

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