|
1 | | -# Account MCP Tools |
| 1 | +# DigitalOcean Account Tools |
2 | 2 |
|
3 | | -This directory contains tools and resources for interacting with DigitalOcean account-related features via the MCP Server. These tools allow you to query and manage account information, billing, invoices, SSH keys, and actions. |
| 3 | +This directory provides tool-based handlers for interacting with DigitalOcean account-related features via the MCP Server. All account operations are exposed as tools that accept structured arguments—no resource URIs are used. Pagination and filtering are supported where applicable. |
4 | 4 |
|
5 | 5 | ## Supported Tools |
6 | 6 |
|
7 | | -- `digitalocean-key-create`: Create a new SSH key for your account. This tool lets you add a new public SSH key, which can then be used for Droplet or App Platform deployments. |
8 | | -- `digitalocean-key-delete`: Delete an existing SSH key by its ID. Useful for removing unused or compromised keys from your account. |
| 7 | +### Actions |
9 | 8 |
|
10 | | -## Supported Resources |
| 9 | +- **digitalocean-action-get** |
| 10 | + - Get a specific action by its ID. |
| 11 | + - Arguments: |
| 12 | + - `ID` (number, required): The action ID. |
11 | 13 |
|
12 | | -- `account://current`: Retrieve information about the current DigitalOcean account, such as email, UUID, status, and more. |
13 | | -- `balance://current`: Get the current account balance, including outstanding charges and account credits. |
14 | | -- `billing://{last}`: Fetch billing history for the last N months. Replace `{last}` with the number of months you want to retrieve. |
15 | | -- `invoice://{last}`: Retrieve invoice history for the last N months. Replace `{last}` with the number of months you want to retrieve. |
16 | | -- `actions://{id}`: Get information about a specific action (such as Droplet creation, deletion, etc.) by its numeric ID. |
17 | | -- `keys://{id}`: Retrieve information about a specific SSH key by its numeric ID. |
| 14 | +- **digitalocean-action-list** |
| 15 | + - List actions with pagination. |
| 16 | + - Arguments: |
| 17 | + - `Page` (number, default: 1): Page number. |
| 18 | + - `PerPage` (number, default: 30): Items per page. |
18 | 19 |
|
19 | | -## Example Queries Using Account MCP Tools |
| 20 | +### Balance |
20 | 21 |
|
21 | | -- Show me my current account information. |
22 | | -- What is my current DigitalOcean balance? |
23 | | -- List my billing history for the last 3 months. |
24 | | -- Get all invoices from the past 6 months. |
25 | | -- Show details for action ID 12345678. |
26 | | -- Retrieve information about SSH key with ID 987654. |
27 | | -- Add a new SSH key to my account. |
28 | | -- Remove SSH key with ID 12345. |
| 22 | +- **digitalocean-balance-get** |
| 23 | + - Get balance information for the user account. |
| 24 | + - Arguments: _none_ |
| 25 | + |
| 26 | +### Billing |
| 27 | + |
| 28 | +- **digitalocean-billing-history-list** |
| 29 | + - List billing history with pagination. |
| 30 | + - Arguments: |
| 31 | + - `Page` (number, default: 1): Page number. |
| 32 | + - `PerPage` (number, default: 30): Items per page. |
| 33 | + |
| 34 | +### Invoices |
| 35 | + |
| 36 | +- **digitalocean-invoice-list** |
| 37 | + - List invoices with pagination. |
| 38 | + - Arguments: |
| 39 | + - `Page` (number, default: 1): Page number. |
| 40 | + - `PerPage` (number, default: 30): Items per page. |
| 41 | + |
| 42 | +### SSH Keys |
| 43 | + |
| 44 | +- **digitalocean-key-create** |
| 45 | + - Create a new SSH key. |
| 46 | + - Arguments: |
| 47 | + - `Name` (string, required): Name of the SSH key. |
| 48 | + - `PublicKey` (string, required): Public key content. |
| 49 | + |
| 50 | +- **digitalocean-key-delete** |
| 51 | + - Delete an SSH key by its ID. |
| 52 | + - Arguments: |
| 53 | + - `ID` (number, required): ID of the SSH key to delete. |
| 54 | + |
| 55 | +- **digitalocean-key-get** |
| 56 | + - Get a specific SSH key by its ID. |
| 57 | + - Arguments: |
| 58 | + - `ID` (number, required): ID of the SSH key. |
| 59 | + |
| 60 | +- **digitalocean-key-list** |
| 61 | + - List SSH keys with pagination. |
| 62 | + - Arguments: |
| 63 | + - `Page` (number, default: 1): Page number. |
| 64 | + - `PerPage` (number, default: 30): Items per page. |
| 65 | + |
| 66 | +### Account Information |
| 67 | + |
| 68 | +- **digitalocean-account-get-information** |
| 69 | + - Retrieves account information for the current user. |
| 70 | + - Arguments: _none_ |
| 71 | + |
| 72 | +--- |
| 73 | + |
| 74 | +## Example Usage |
| 75 | + |
| 76 | +- Get details for action ID 123456: |
| 77 | + - Tool: `digitalocean-action-get` |
| 78 | + - Arguments: `{ "ID": 123456 }` |
| 79 | + |
| 80 | +- List actions (page 2, 50 per page): |
| 81 | + - Tool: `digitalocean-action-list` |
| 82 | + - Arguments: `{ "Page": 2, "PerPage": 50 }` |
| 83 | + |
| 84 | +- Get current account balance: |
| 85 | + - Tool: `digitalocean-balance-get` |
| 86 | + - Arguments: `{}` |
| 87 | + |
| 88 | +- List billing history (first page, 10 items per page): |
| 89 | + - Tool: `digitalocean-billing-history-list` |
| 90 | + - Arguments: `{ "Page": 1, "PerPage": 10 }` |
| 91 | + |
| 92 | +- List invoices (default pagination): |
| 93 | + - Tool: `digitalocean-invoice-list` |
| 94 | + - Arguments: `{}` |
| 95 | + |
| 96 | +- Create a new SSH key: |
| 97 | + - Tool: `digitalocean-key-create` |
| 98 | + - Arguments: `{ "Name": "my-key", "PublicKey": "ssh-rsa AAAA..." }` |
| 99 | + |
| 100 | +- Delete SSH key with ID 98765: |
| 101 | + - Tool: `digitalocean-key-delete` |
| 102 | + - Arguments: `{ "ID": 98765 }` |
| 103 | + |
| 104 | +- Get SSH key by ID: |
| 105 | + - Tool: `digitalocean-key-get` |
| 106 | + - Arguments: `{ "ID": 12345 }` |
| 107 | + |
| 108 | +- List SSH keys (page 3, 20 per page): |
| 109 | + - Tool: `digitalocean-key-list` |
| 110 | + - Arguments: `{ "Page": 3, "PerPage": 20 }` |
| 111 | + |
| 112 | +- Get current account information: |
| 113 | + - Tool: `digitalocean-account-get-information` |
| 114 | + - Arguments: `{}` |
| 115 | + |
| 116 | +--- |
29 | 117 |
|
30 | 118 | ## Notes |
31 | 119 |
|
32 | | -- Most resources are read-only and provide information about your account and its usage. |
33 | | -- The SSH key tools (`digitalocean-key-create` and `digitalocean-key-delete`) allow you to manage your account's SSH keys directly. |
34 | | -- For endpoints that require an ID or a count (such as `{id}` or `{last}`), replace the placeholder with the appropriate value in your query. |
| 120 | +- All tools use argument-based input; do not use resource URIs. |
| 121 | +- Pagination is supported for list endpoints via `Page` and `PerPage` arguments. |
| 122 | +- All responses are returned as JSON-formatted text. |
| 123 | +- Error handling is consistent: errors are returned in the tool result with an error flag and message. |
0 commit comments