Skip to main content
Glama
rainhan99

Cloud Manage MCP Server

by rainhan99

get_alibaba_instance_monitoring

Retrieve monitoring data for Alibaba Cloud ECS instances to track performance metrics and resource usage through the Cloud Manage MCP Server.

Instructions

获取阿里云ECS实例监控信息

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
instance_idYes

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Implementation Reference

  • main.py:620-625 (registration)
    MCP tool registration and handler for get_alibaba_instance_monitoring, which calls the provider's method to retrieve monitoring data.
    @mcp.tool()
    def get_alibaba_instance_monitoring(instance_id: str) -> Dict:
        """
        获取阿里云ECS实例监控信息
        """
        return alibaba_provider.get_instance_monitoring(instance_id)
  • Core handler logic in AlibabaProvider class that fetches instance monitoring information using Alibaba Cloud ECS SDK. Note: Currently simplified, suggests using cloud monitor API for full data.
    def get_instance_monitoring(self, instance_id: str) -> Dict:
        """
        获取ECS实例的监控信息
        
        Args:
            instance_id (str): ECS实例ID
            
        Returns:
            Dict: 监控信息或错误信息
        """
        if not self.available:
            return {
                'error': f'阿里云服务不可用: {getattr(self, "error", "未知错误")}',
                'provider': 'alibaba'
            }
        
        try:
            # 这里简化实现,实际需要调用云监控API
            request = ecs_models.DescribeInstancesRequest(
                region_id=self.region_id,
                instance_ids=json.dumps([instance_id])
            )
            
            response = self.client.describe_instances(request)
            
            if not response.body.instances or not response.body.instances.instance:
                return {
                    'error': f'未找到ID为 {instance_id} 的ECS实例',
                    'provider': 'alibaba'
                }
            
            return {
                'provider': 'alibaba',
                'instance_id': instance_id,
                'monitoring_available': True,
                'message': '监控功能可用,具体数据需要通过云监控API获取'
            }
            
        except Exception as e:
            return {
                'error': f'获取监控信息时发生错误: {str(e)}',
                'provider': 'alibaba'
            }
Behavior2/5

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

No annotations are provided, so the description carries full burden. It implies a read-only operation ('获取' - get), but doesn't disclose any behavioral traits such as authentication requirements, rate limits, error conditions, or what the monitoring data includes (e.g., CPU, memory, network metrics). For a tool with no annotation coverage, this leaves significant gaps in understanding how it behaves.

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 any fluff. 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.

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 should document return values), the description's minimalism is somewhat acceptable. However, with no annotations, 0% schema description coverage, and a single parameter, the description doesn't provide enough context about usage, behavior, or parameter details to be fully complete. It meets a bare minimum but leaves the agent with significant uncertainty.

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

Parameters2/5

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

Schema description coverage is 0%, so the description must compensate. It mentions '阿里云ECS实例' (Alibaba Cloud ECS instance), which hints at the 'instance_id' parameter, but doesn't add meaningful semantics beyond what's obvious from the parameter name. No details are provided about the format, constraints, or examples for the instance ID, leaving the parameter poorly documented.

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 '获取阿里云ECS实例监控信息' (Get Alibaba Cloud ECS instance monitoring information) states a clear verb ('获取' - get) and resource ('阿里云ECS实例监控信息' - Alibaba Cloud ECS instance monitoring information), but it's somewhat vague about what specific monitoring information is retrieved. It distinguishes from some siblings like 'get_alibaba_instance_info' by focusing on monitoring, but doesn't clearly differentiate from 'get_aws_instance_monitoring' or 'get_digitalocean_droplet_monitoring' beyond the provider.

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 when this tool is appropriate compared to other monitoring tools (like AWS or DigitalOcean variants), nor does it specify prerequisites or constraints. The agent must infer usage from the tool name 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

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/rainhan99/cloud_manage_mcp_server'

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