Skip to main content
Glama
runpod

RunPod MCP Server

Official
by runpod

create-pod

Create a new GPU or CPU pod on RunPod by specifying image, GPU type, cloud type, ports, environment variables, and more. Defaults to the latest RunPod Pytorch image if none provided.

Instructions

Create a new GPU/CPU pod on RunPod. If the user does not specify an image, recommend the "Runpod Pytorch 2.8.0" image (runpod/pytorch:1.0.2-cu1281-torch280-ubuntu2404) as the default — it has the most up-to-date CUDA and PyTorch versions.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
nameNoName for the pod
imageNameYesDocker image to use
cloudTypeNoSECURE or COMMUNITY cloud
gpuTypeIdsNoList of acceptable GPU types
gpuCountNoNumber of GPUs
containerDiskInGbNoContainer disk size in GB
volumeInGbNoVolume size in GB
volumeMountPathNoPath to mount the volume
portsNoPorts to expose (e.g., '8888/http', '22/tcp')
envNoEnvironment variables
dataCenterIdsNoList of data centers

Implementation Reference

  • src/index.ts:430-474 (registration)
    Registration of the 'create-pod' tool on the MCP server using server.tool(), with name, description, and schema defined inline.
    // Create Pod
    server.tool(
      'create-pod',
      'Create a new GPU/CPU pod on RunPod. If the user does not specify an image, recommend the "Runpod Pytorch 2.8.0" image (runpod/pytorch:1.0.2-cu1281-torch280-ubuntu2404) as the default — it has the most up-to-date CUDA and PyTorch versions.',
      {
        name: z.string().optional().describe('Name for the pod'),
        imageName: z.string().describe('Docker image to use'),
        cloudType: z
          .enum(['SECURE', 'COMMUNITY'])
          .optional()
          .describe('SECURE or COMMUNITY cloud'),
        gpuTypeIds: z
          .array(z.string())
          .optional()
          .describe('List of acceptable GPU types'),
        gpuCount: z.number().optional().describe('Number of GPUs'),
        containerDiskInGb: z
          .number()
          .optional()
          .describe('Container disk size in GB'),
        volumeInGb: z.number().optional().describe('Volume size in GB'),
        volumeMountPath: z.string().optional().describe('Path to mount the volume'),
        ports: z
          .array(z.string())
          .optional()
          .describe("Ports to expose (e.g., '8888/http', '22/tcp')"),
        env: z.record(z.string()).optional().describe('Environment variables'),
        dataCenterIds: z
          .array(z.string())
          .optional()
          .describe('List of data centers'),
      },
      async (params) => {
        const result = await runpodRequest('/pods', 'POST', params);
    
        return {
          content: [
            {
              type: 'text',
              text: JSON.stringify(result, null, 2),
            },
          ],
        };
      }
    );
  • Handler function for 'create-pod' — calls runpodRequest('/pods', 'POST', params) to create a new pod via the RunPod API, then returns the result as JSON text.
    async (params) => {
      const result = await runpodRequest('/pods', 'POST', params);
    
      return {
        content: [
          {
            type: 'text',
            text: JSON.stringify(result, null, 2),
          },
        ],
      };
    }
  • Input schema for 'create-pod' using Zod: defines optional fields (name, cloudType, gpuTypeIds, gpuCount, containerDiskInGb, volumeInGb, volumeMountPath, ports, env, dataCenterIds) and required field imageName.
    {
      name: z.string().optional().describe('Name for the pod'),
      imageName: z.string().describe('Docker image to use'),
      cloudType: z
        .enum(['SECURE', 'COMMUNITY'])
        .optional()
        .describe('SECURE or COMMUNITY cloud'),
      gpuTypeIds: z
        .array(z.string())
        .optional()
        .describe('List of acceptable GPU types'),
      gpuCount: z.number().optional().describe('Number of GPUs'),
      containerDiskInGb: z
        .number()
        .optional()
        .describe('Container disk size in GB'),
      volumeInGb: z.number().optional().describe('Volume size in GB'),
      volumeMountPath: z.string().optional().describe('Path to mount the volume'),
      ports: z
        .array(z.string())
        .optional()
        .describe("Ports to expose (e.g., '8888/http', '22/tcp')"),
      env: z.record(z.string()).optional().describe('Environment variables'),
      dataCenterIds: z
        .array(z.string())
        .optional()
        .describe('List of data centers'),
  • runpodRequest helper function — makes authenticated HTTP requests to the RunPod REST API at https://rest.runpod.io/v1 with Bearer token auth.
    async function runpodRequest(
      endpoint: string,
      method: string = 'GET',
      body?: Record<string, unknown>
    ) {
      const url = `${API_BASE_URL}${endpoint}`;
      const headers = {
        Authorization: `Bearer ${API_KEY}`,
        'Content-Type': 'application/json',
      };
    
      const options: NodeFetchRequestInit = {
        method,
        headers,
      };
    
      if (body && (method === 'POST' || method === 'PATCH')) {
        options.body = JSON.stringify(body);
      }
    
      try {
        const response = await fetch(url, options);
    
        if (!response.ok) {
          const errorText = await response.text();
          throw new Error(`RunPod API Error: ${response.status} - ${errorText}`);
        }
    
        // Some endpoints might not return JSON
        const contentType = response.headers.get('content-type');
        if (contentType && contentType.includes('application/json')) {
          return await response.json();
        }
    
        return { success: true, status: response.status };
      } catch (error) {
        console.error('Error calling RunPod API:', error);
        throw error;
      }
    }
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, so the description must cover behavioral traits. It only states the creation action and gives a default image, failing to disclose side effects, billing implications, auth requirements, or response behavior.

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 two sentences long with no redundancy. It front-loads the purpose and then adds the key default recommendation, making it efficient and easy to scan.

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?

Despite good schema coverage, the description lacks context on return values, error states, or post-creation behavior. For a tool with 11 parameters and no output schema, more completeness is needed to guide the agent.

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

Parameters4/5

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

Schema coverage is 100%, providing baseline. The description adds value by recommending a specific default image if none specified, which is not in the schema's description for imageName.

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

Purpose5/5

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

The description clearly states the verb 'Create' and the resource 'GPU/CPU pod on RunPod', distinguishing it from sibling tools like delete-pod or update-pod. The default image recommendation adds specificity.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides a default image suggestion, guiding usage when imageName is omitted, but does not give explicit when-to-use or when-to-avoid guidance versus alternatives like create-template or create-endpoint.

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

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-ts'

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