get_endpoint_details
Retrieve comprehensive details for a specific DigitalOcean API endpoint using its operation ID, enabling precise API integration and management via the MCP server.
Instructions
Get detailed information about a specific endpoint
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| operationId | Yes | Operation ID of the endpoint |
Implementation Reference
- src/index.ts:259-296 (handler)The handler function that implements the core logic of the get_endpoint_details tool. It retrieves the endpoint by operationId using the findEndpoint helper, formats a detailed markdown-like string with method, path, operationId, summary, description, tags, and parameters list, and returns it as text content.private async handleGetEndpointDetails(args: any) { const { operationId } = args; const endpoint = findEndpoint(operationId); if (!endpoint) { throw new Error(`Endpoint not found: ${operationId}`); } const paramsList = endpoint.parameters.length > 0 ? endpoint.parameters.map(p => ` • ${p.name} (${p.in}): ${p.type} ${p.required ? '(required)' : '(optional)'} - ${p.description}` ).join('\n') : ' None'; const details = ` **${endpoint.method} ${endpoint.path}** **Operation ID:** ${endpoint.operationId} **Summary:** ${endpoint.summary} **Description:** ${endpoint.description} **Tags:** ${endpoint.tags.join(', ')} **Parameters:** ${paramsList} `.trim(); return { content: [ { type: 'text', text: details, }, ], }; }
- src/index.ts:117-126 (schema)The input schema defining the parameters for the get_endpoint_details tool, which requires a string 'operationId'.inputSchema: { type: 'object', properties: { operationId: { type: 'string', description: 'Operation ID of the endpoint', }, }, required: ['operationId'], },
- src/index.ts:114-127 (registration)Registration of the get_endpoint_details tool in the ListToolsRequest handler, including name, description, and input schema.{ name: 'get_endpoint_details', description: 'Get detailed information about a specific endpoint', inputSchema: { type: 'object', properties: { operationId: { type: 'string', description: 'Operation ID of the endpoint', }, }, required: ['operationId'], }, } as Tool,
- src/index.ts:174-175 (registration)Dispatch registration in the CallToolRequest switch statement that calls the handler for get_endpoint_details.case 'get_endpoint_details': return await this.handleGetEndpointDetails(args);
- src/endpoints.ts:27-30 (helper)Key helper function used by the handler to locate the specific endpoint by its operationId from the cached endpoints list.export function findEndpoint(operationId: string): DOEndpoint | undefined { const endpoints = loadEndpoints(); return endpoints.find(ep => ep.operationId === operationId); }