Skip to main content
Glama
rainhan99

Cloud Manage MCP Server

by rainhan99

get_digitalocean_droplet_monitoring

Retrieve monitoring data for DigitalOcean droplets to track performance metrics and resource usage.

Instructions

获取DigitalOcean Droplet监控信息

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
droplet_idYes

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Implementation Reference

  • main.py:468-473 (registration)
    MCP tool registration and thin handler wrapper that delegates to the DigitalOcean provider's get_droplet_monitoring method.
    def get_digitalocean_droplet_monitoring(droplet_id: int) -> Dict:
        """
        获取DigitalOcean Droplet监控信息
        """
        return digitalocean_provider.get_droplet_monitoring(droplet_id)
  • Core handler logic in DigitalOceanProvider class that checks if the droplet exists, verifies monitoring is enabled, and returns status or error using the pydo Client API.
    def get_droplet_monitoring(self, droplet_id: int) -> Dict:
        """
        获取Droplet监控信息
        
        Args:
            droplet_id (int): Droplet ID
            
        Returns:
            Dict: 监控信息或错误信息
        """
        if not self.available:
            return {
                'error': f'DigitalOcean服务不可用: {getattr(self, "error", "未知错误")}',
                'provider': 'digitalocean'
            }
        
        try:
            # 先检查droplet是否存在和是否启用了监控
            droplet_response = self.client.droplets.get(droplet_id)
            droplet = droplet_response.get("droplet", {})
            
            if not droplet:
                return {
                    'error': f'未找到ID为 {droplet_id} 的Droplet',
                    'provider': 'digitalocean'
                }
            
            features = droplet.get("features", [])
            monitoring_enabled = "monitoring" in features
            
            if not monitoring_enabled:
                return {
                    'provider': 'digitalocean',
                    'droplet_id': droplet_id,
                    'monitoring_enabled': False,
                    'message': '此Droplet未启用监控功能。请在DigitalOcean控制面板中启用监控功能后重试。'
                }
            
            # 获取监控数据(简化版本)
            return {
                'provider': 'digitalocean',
                'droplet_id': droplet_id,
                'monitoring_enabled': True,
                'message': '监控功能已启用,具体数据需要通过DigitalOcean API获取'
            }
            
        except Exception as e:
            return {
                'error': f'获取Droplet监控信息时发生错误: {str(e)}',
                'provider': 'digitalocean'
            }
Behavior2/5

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

With no annotations provided, the description carries the full burden of behavioral disclosure. It states the tool retrieves monitoring information, implying a read-only operation, but doesn't specify authentication needs, rate limits, error conditions, or the format of returned data. This leaves significant gaps for an agent to understand how to interact with 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.

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. It's front-loaded with no unnecessary words, making it highly concise and well-structured for quick 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 1 parameter with 0% schema coverage, no annotations, and an output schema exists, the description is minimally complete. It identifies the resource and action but lacks details on parameter meaning, behavioral traits, and usage context. The output schema may cover return values, but the description doesn't provide enough guidance for effective tool selection and invocation.

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 'DigitalOcean Droplet监控信息', which implies a droplet_id parameter, but doesn't explain what droplet_id is, its format, or where to obtain it. The description adds minimal semantic value beyond what the bare schema provides.

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 '获取DigitalOcean Droplet监控信息' clearly states the action (获取/get) and resource (DigitalOcean Droplet监控信息/monitoring information), but it's vague about what specific monitoring data is retrieved. It distinguishes from siblings like 'get_digitalocean_droplet_info' by specifying monitoring, but doesn't detail the scope or type of metrics.

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. It doesn't mention prerequisites, such as needing a valid droplet ID, or differentiate from other monitoring tools like 'get_aws_instance_monitoring'. The description alone offers no usage context.

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