Skip to main content
Glama

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
NameRequiredDescriptionDefault
endpointIdYesID of the endpoint to retrieve
includeTemplateNoInclude template information
includeWorkersNoInclude information about workers

Implementation Reference

  • 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), }, ], }; }
  • 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), }, ], }; } );

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/runpod/runpod-mcp'

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