Skip to main content
Glama
dam2452

vastai-mcp

by dam2452

create_instance

Rent a GPU instance from Vast.ai by providing an offer ID and either an image or template, with optional spot pricing and startup commands.

Instructions

Rent a GPU by accepting offer_id (PUT /asks/{offer_id}/).

Either image or template_hash_id must be provided. Use price to create an interruptible (spot) instance; omit it for on-demand.

env is a flat dict: regular vars as key/value pairs, port mappings as {"-p 8000:8000": "1"}. Use onstart to launch your app on SSH/Jupyter runtypes (their entrypoint is replaced by Vast's).

Examples: create_instance(offer_id=12345678, image="ubuntu:22.04", disk=16, runtype="ssh_direct") create_instance(offer_id=12345678, image="vllm/vllm-openai:latest", disk=50, runtype="ssh_direct", env={"MODEL_ID": "deepseek-ai/DeepSeek-R1-Distill-Llama-8B", "-p 8000:8000": "1"}, onstart="vllm serve $MODEL_ID --port 8000") create_instance(offer_id=12345678, template_hash_id="4e17788f74f075dd9aab7d0d4427968f", disk=100) create_instance(offer_id=12345678, image="ubuntu:22.04", disk=16, runtype="ssh_direct", price=0.20)

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
envNo
diskNo
imageNo
labelNo
priceNo
onstartNo
runtypeNossh_direct
args_strNo
offer_idYes
image_loginNo
jupyter_dirNo
volume_infoNo
use_jupyter_labNo
template_hash_idNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Behavior4/5

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

With no annotations, the description carries the full burden and does disclose important behavior: env must be a flat dict and how port mappings are encoded, onstart behavior on SSH/Jupyter runtypes, and that the entrypoint is replaced by Vast's. It does not cover side effects like billing or authentication, but the provided behaviors are substantive and help the agent understand what the tool does beyond a simple create.

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 well-structured: a concise opening, followed by essential usage notes, then four diverse examples. Every sentence adds value, and the examples cover the main variations (image-based, template-based, spot instance, env/onstart usage). It is appropriately sized for the tool's complexity.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a complex tool with 14 parameters and no annotations, the description covers the most critical aspects and provides a range of examples. An output schema exists, so return values do not need to be explained. It misses explanation of some parameters and does not mention billing or permission requirements, but overall it gives enough for common use cases.

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

Parameters3/5

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

Schema description coverage is 0%, so the description must compensate. It explains several key parameters (image, template_hash_id, price, env, onstart, runtype) and provides examples. However, 14 parameters exist, and several (disk, label, args_str, image_login, jupyter_dir, volume_info, use_jupyter_lab) are not explained at all, leaving gaps for an agent to infer their meaning.

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 tool's purpose: 'Rent a GPU by accepting offer_id (PUT /asks/{offer_id}/)'. This is a specific verb+resource combination. It is distinct from sibling tools like list_instances, destroy_instance, and search_offers, leaving no ambiguity about when to invoke it.

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

Usage Guidelines4/5

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

The description provides clear usage context: it states the required fallback between image and template_hash_id, explains how to request spot instances via price, and shows how to use onstart for app launch. It does not explicitly mention when not to use the tool or alternative tools, but the guidance is strong and practical.

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/dam2452/vastai-mcp'

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