Skip to main content
Glama
rainhan99

Cloud Manage MCP Server

by rainhan99

get_digitalocean_droplet_actions

Retrieve the action history for a DigitalOcean Droplet to monitor operations, track changes, and audit management activities on your cloud server.

Instructions

获取DigitalOcean Droplet操作历史

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
droplet_idYes

Implementation Reference

  • main.py:475-479 (handler)
    MCP tool handler for get_digitalocean_droplet_actions, decorated with @mcp.tool(). Delegates to digitalocean_provider.get_droplet_actions.
    def get_digitalocean_droplet_actions(droplet_id: int) -> Dict: """ 获取DigitalOcean Droplet操作历史 """ return digitalocean_provider.get_droplet_actions(droplet_id)
  • Core implementation of the droplet actions retrieval in DigitalOceanProvider class using pydo Client to list droplet actions.
    def get_droplet_actions(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: response = self.client.droplet_actions.list(droplet_id=droplet_id) actions = response.get("actions", []) action_list = [] for action in actions: action_info = { 'id': action.get("id"), 'status': action.get("status"), 'type': action.get("type"), 'started_at': action.get("started_at"), 'completed_at': action.get("completed_at"), 'resource_id': action.get("resource_id"), 'resource_type': action.get("resource_type"), 'region': action.get("region", {}).get("name", "未知") } action_list.append(action_info) return { 'provider': 'digitalocean', 'droplet_id': droplet_id, 'total_actions': len(action_list), 'actions': action_list } except Exception as e: return { 'error': f'获取Droplet操作历史时发生错误: {str(e)}', 'provider': 'digitalocean' }

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