Skip to main content
Glama
amranu

DigitalOcean MCP Server

by amranu

list_endpoints

Explore and filter DigitalOcean API endpoints using tag or limit criteria. Dynamically extract and manage endpoints from OpenAPI specifications for efficient API access.

Instructions

List all available DigitalOcean API endpoints

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
limitNoLimit number of results
tagNoFilter by tag (optional)

Implementation Reference

  • The handler function that implements the core logic for the 'list_endpoints' tool. It destructures arguments for tag filter and limit, loads or filters endpoints accordingly, slices to the limit, formats them into a bullet list, and returns a text content response.
    private async handleListEndpoints(args: any) {
      const { tag, limit = 50 } = args;
      
      let endpoints = tag ? getEndpointsByTag(tag) : loadEndpoints();
      endpoints = endpoints.slice(0, limit);
    
      const endpointList = endpoints.map(ep => 
        `• ${ep.method} ${ep.path} - ${ep.summary} (${ep.operationId})`
      ).join('\n');
    
      return {
        content: [
          {
            type: 'text',
            text: `Found ${endpoints.length} endpoints:\n\n${endpointList}`,
          },
        ],
      };
    }
  • The input schema definition for the 'list_endpoints' tool, specifying optional 'tag' string and 'limit' number parameters.
    inputSchema: {
      type: 'object',
      properties: {
        tag: {
          type: 'string',
          description: 'Filter by tag (optional)',
        },
        limit: {
          type: 'number',
          description: 'Limit number of results',
          default: 50,
        },
      },
      required: [],
    },
  • src/index.ts:168-170 (registration)
    The switch case registration in the CallToolRequest handler that routes 'list_endpoints' calls to the handleListEndpoints method.
    case 'list_endpoints':
      return await this.handleListEndpoints(args);
  • src/index.ts:76-94 (registration)
    The tool object registration in the ListToolsRequest handler, including name, description, and schema.
    {
      name: 'list_endpoints',
      description: 'List all available DigitalOcean API endpoints',
      inputSchema: {
        type: 'object',
        properties: {
          tag: {
            type: 'string',
            description: 'Filter by tag (optional)',
          },
          limit: {
            type: 'number',
            description: 'Limit number of results',
            default: 50,
          },
        },
        required: [],
      },
    } as Tool,
  • Helper function loadEndpoints() that loads and caches DigitalOcean API endpoints from JSON file, used when no tag filter is provided.
    export function loadEndpoints(): DOEndpoint[] {
      if (cachedEndpoints) {
        return cachedEndpoints;
      }
    
      try {
        const endpointsPath = join(__dirname, '..', 'digitalocean_endpoints.json');
        const data = readFileSync(endpointsPath, 'utf-8');
        cachedEndpoints = JSON.parse(data) as DOEndpoint[];
        return cachedEndpoints;
      } catch (error) {
        console.error('Failed to load endpoints:', error);
        return [];
      }
    }
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 what the tool does but doesn't describe how it behaves—no information on pagination, rate limits, authentication needs, error handling, or what 'list all' means in practice (e.g., does it return a complete list or require pagination?). This leaves significant gaps in understanding the tool's operation.

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 that states the tool's purpose without unnecessary words. It's front-loaded with the core action and resource, making it easy to parse. Every word earns its place, achieving ideal conciseness for a simple listing tool.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the tool's simplicity (2 optional parameters, no output schema, no annotations), the description is incomplete. It doesn't address behavioral aspects like how results are returned (e.g., paginated vs. all at once), error cases, or usage context relative to siblings. For a tool with no annotations or output schema, more contextual information would be helpful for the agent.

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

Parameters3/5

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

Schema description coverage is 100%, with both parameters ('limit' and 'tag') clearly documented in the schema. The description adds no parameter-specific information beyond what the schema provides. According to the rules, when schema coverage is high (>80%), the baseline score is 3 even with no param info in the description, which applies here.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the verb ('List') and resource ('all available DigitalOcean API endpoints'), making the tool's purpose immediately understandable. It doesn't explicitly differentiate from siblings like 'search_endpoints' or 'get_endpoint_details', but the scope ('all available') provides some implicit distinction. This is clear but lacks explicit sibling differentiation.

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 like 'search_endpoints' or 'get_endpoint_details'. There's no mention of prerequisites, context, or exclusions. The agent must infer usage from the name and description alone, which is insufficient for optimal tool selection.

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

Related 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/amranu/digitalocean-mcp'

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