Skip to main content
Glama
aliyun

AlibabaCloud MCP Server

Official
by aliyun

GetDiskUsedData

Monitor and retrieve disk partition usage metrics for AlibabaCloud ECS instances using specified region and instance IDs, enabling efficient resource management.

Instructions

获取磁盘分区使用量指标数据

Input Schema

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

Implementation Reference

  • Handler function for the CMS_GetDiskUsedData tool (matches 'GetDiskUsedData'), which fetches disk used metrics from Alibaba Cloud CMS using the _get_cms_metric_data helper. Includes input schema via Pydantic Fields.
    @tools.append
    def CMS_GetDiskUsedData(
        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_used')
  • MCP server registration where all tools from cms_tools.tools (including CMS_GetDiskUsedData) are registered into the FastMCP server instance.
    for tool in cms_tools.tools:
        mcp.tool(tool)
  • Helper function used by CMS_GetDiskUsedData to query CMS metric data for the specified metric ('diskusage_used').
    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
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 states it 'gets' data, implying a read-only operation, but doesn't clarify aspects like whether it requires specific permissions, rate limits, data freshness, or error handling. For a tool with no annotations, this leaves significant gaps in understanding its behavior.

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 slightly more informative without losing conciseness.

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's moderate complexity (retrieving metric data with two parameters), no annotations, and no output schema, the description is minimally adequate. It covers the basic purpose but lacks details on behavior, output format, or usage context, which are important for an agent to operate effectively in this server environment with many sibling tools.

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 parameter-specific information beyond what's in the input schema, which has 100% description coverage. It doesn't explain the relationship between InstanceIds and RegionId or provide usage examples. With high schema coverage, the baseline is 3, as the schema adequately documents parameters without extra help from the description.

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

Purpose4/5

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

The description '获取磁盘分区使用量指标数据' (Get disk partition usage metric data) clearly states the verb (get) and resource (disk partition usage metrics). It distinguishes from siblings like GetDiskTotalData (total disk data) and GetDiskUsageData (usage data without specifying partition focus), though the distinction could be more explicit.

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 like GetDiskUsageData or GetDiskTotalData. It lacks context about prerequisites, such as needing AlibabaCloud ECS instances, or exclusions, leaving the agent to infer usage from the input schema 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