Skip to main content
Glama
aliyun

AlibabaCloud MCP Server

Official
by aliyun

GetDiskUsageData

Retrieve disk utilization metrics for AlibabaCloud ECS instances to monitor storage performance and optimize resource allocation efficiently.

Instructions

获取磁盘利用率指标数据

Input Schema

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

Implementation Reference

  • The handler function for the CMS_GetDiskUsageData tool. It defines the input schema using Pydantic Field and executes the logic by retrieving disk usage utilization metrics from Alibaba Cloud CMS.
    @tools.append
    def CMS_GetDiskUsageData(
        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_utilization')
  • Supporting helper function that fetches the actual metric data from Alibaba Cloud CMS using the provided client, instance IDs, and metric name.
    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
  • Registers all tools from cms_tools (including CMS_GetDiskUsageData) into the FastMCP server instance.
    for tool in cms_tools.tools:
        mcp.tool(tool)
  • Imports the cms_tools module which contains the tool definitions and the tools list.
    from alibaba_cloud_ops_mcp_server.tools import cms_tools, oos_tools, oss_tools, api_tools, common_api_tools
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 only states what data is retrieved ('disk utilization metric data') without disclosing behavioral traits like whether this is a real-time or historical query, if it requires specific permissions, rate limits, or what the output format looks like (e.g., JSON structure, units). This is inadequate for a tool with no annotation coverage.

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 in Chinese that directly states the tool's purpose without unnecessary words. It's appropriately sized and front-loaded, making it easy to parse quickly.

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 (retrieving metrics from a cloud service), lack of annotations, and no output schema, the description is incomplete. It doesn't explain what 'disk utilization metric data' includes (e.g., percentages, timestamps, aggregation), how results are returned, or any prerequisites, leaving significant gaps for an AI agent to use the tool effectively.

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%, with clear descriptions for InstanceIds ('AlibabaCloud ECS instance ID List') and RegionId ('AlibabaCloud region ID'). The description adds no parameter semantics beyond the schema, but the baseline is 3 since the schema adequately documents the parameters.

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 utilization metric data) states a clear verb ('get') and resource ('disk utilization metric data'), but it's vague about what specific metrics are retrieved. It doesn't distinguish from siblings like GetDiskTotalData or GetDiskUsedData, leaving ambiguity about what 'utilization' encompasses (e.g., percentage, raw values, or both).

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?

No guidance is provided on when to use this tool versus alternatives. With siblings like GetDiskTotalData and GetDiskUsedData, the description doesn't clarify if this tool combines both metrics or serves a different purpose, leaving the agent to guess based on tool names alone.

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