get-template
Retrieve a specific template by its ID from the RunPod MCP Server to configure and deploy cloud computing resources.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| templateId | Yes | ID of the template to retrieve |
Implementation Reference
- src/index.ts:513-524 (handler)Handler function for the 'get-template' tool that retrieves template details by making an authenticated API request to RunPod's /templates/{templateId} endpoint and returns the result as formatted JSON text.async (params) => { const result = await runpodRequest(`/templates/${params.templateId}`); return { content: [ { type: 'text', text: JSON.stringify(result, null, 2), }, ], }; }
- src/index.ts:510-512 (schema)Input schema validation for the 'get-template' tool using Zod, defining the required 'templateId' parameter.{ templateId: z.string().describe('ID of the template to retrieve'), },
- src/index.ts:508-525 (registration)Registration of the 'get-template' tool on the MCP server using server.tool(), specifying the tool name, input schema, and handler function.server.tool( 'get-template', { templateId: z.string().describe('ID of the template to retrieve'), }, async (params) => { const result = await runpodRequest(`/templates/${params.templateId}`); return { content: [ { type: 'text', text: JSON.stringify(result, null, 2), }, ], }; } );