get-endpoint
Retrieve detailed information about a specific RunPod endpoint, including its configuration, template details, and worker status for API management.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| endpointId | Yes | ID of the endpoint to retrieve | |
| includeTemplate | No | Include template information | |
| includeWorkers | No | Include information about workers |
Implementation Reference
- src/index.ts:371-395 (handler)Handler function that constructs query parameters for optional fields and makes an API request to retrieve details of a specific RunPod endpoint.async (params) => { // Construct query parameters const queryParams = new URLSearchParams(); if (params.includeTemplate) queryParams.append('includeTemplate', params.includeTemplate.toString()); if (params.includeWorkers) queryParams.append('includeWorkers', params.includeWorkers.toString()); const queryString = queryParams.toString() ? `?${queryParams.toString()}` : ''; const result = await runpodRequest( `/endpoints/${params.endpointId}${queryString}` ); return { content: [ { type: 'text', text: JSON.stringify(result, null, 2), }, ], }; }
- src/index.ts:360-370 (schema)Input schema for the 'get-endpoint' tool using Zod validation, defining required endpointId and optional flags.{ endpointId: z.string().describe('ID of the endpoint to retrieve'), includeTemplate: z .boolean() .optional() .describe('Include template information'), includeWorkers: z .boolean() .optional() .describe('Include information about workers'), },
- src/index.ts:358-396 (registration)Registration of the 'get-endpoint' tool on the MCP server, including schema and inline handler.server.tool( 'get-endpoint', { endpointId: z.string().describe('ID of the endpoint to retrieve'), includeTemplate: z .boolean() .optional() .describe('Include template information'), includeWorkers: z .boolean() .optional() .describe('Include information about workers'), }, async (params) => { // Construct query parameters const queryParams = new URLSearchParams(); if (params.includeTemplate) queryParams.append('includeTemplate', params.includeTemplate.toString()); if (params.includeWorkers) queryParams.append('includeWorkers', params.includeWorkers.toString()); const queryString = queryParams.toString() ? `?${queryParams.toString()}` : ''; const result = await runpodRequest( `/endpoints/${params.endpointId}${queryString}` ); return { content: [ { type: 'text', text: JSON.stringify(result, null, 2), }, ], }; } );