list_tags
Retrieve all available endpoint tags for DigitalOcean API to improve search, filtering, and targeted API calls.
Instructions
List all available endpoint tags
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Implementation Reference
- src/index.ts:322-333 (handler)Implements the core logic for the 'list_tags' tool: retrieves all unique endpoint tags using getAllTags() and formats them into a textual response.
private async handleListTags() { const tags = getAllTags(); return { content: [ { type: 'text', text: `Available tags:\n\n${tags.map(tag => `• ${tag}`).join('\n')}`, }, ], }; } - src/index.ts:147-155 (registration)Registers the 'list_tags' tool in the MCP server's tool list, specifying its name, description, and input schema (no required parameters).
{ name: 'list_tags', description: 'List all available endpoint tags', inputSchema: { type: 'object', properties: {}, required: [], }, } as Tool, - src/index.ts:150-154 (schema)Defines the input schema for 'list_tags', which accepts an empty object with no required properties.
inputSchema: { type: 'object', properties: {}, required: [], }, - src/endpoints.ts:49-54 (helper)Helper function that loads all endpoints and returns a sorted list of unique tags extracted from them.
export function getAllTags(): string[] { const endpoints = loadEndpoints(); const tags = new Set<string>(); endpoints.forEach(ep => ep.tags.forEach(tag => tags.add(tag))); return Array.from(tags).sort(); }