Skip to main content
Glama

create_instance

Rent a GPU instance from a Vast.ai offer by specifying offer ID and hourly spend cap. Optionally attach or create a volume; returns contract ID once price is verified.

Instructions

Create (rent) a new instance on a specific machine offer (ask id from search_offers), optionally creating and attaching a new volume. Returns the new contract/instance id. Requires max_hourly_price as a spend guardrail: the offer's live price is checked against it and the rental is refused if the price exceeds the cap or can't be verified.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
envNoDocker flags, e.g. '-e HF_TOKEN=hf_xxx -p 8000:8000'.
imageNoDocker image (default: vastai/base-image).
labelNoFriendly instance name.
volumeNoVolume to attach, created on the fly if volume_id is omitted.
disk_gbNoLocal disk in GB (min 8).
runtypeNoRun type (default: ssh).
offer_idYesOffer/ask id returned by search_offers.
target_stateNoState to bring the instance to (default: running).
max_hourly_priceYesRequired spend cap in $/hr. The offer's current dph_total is checked against this before renting; if it exceeds the cap (or can't be fetched), the request is refused.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.1

TDQS

A4.2/5.0
Behavior4/5

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

With no annotations provided, the description carries the full burden — and it delivers: it discloses the refusal behavior (rental is refused if price exceeds the cap or can't be verified), the on-the-fly volume creation side-effect, and the return value (contract/instance id). The main gaps are that it doesn't warn about ongoing hourly billing exposure beyond the cap or explain what happens after creation (lifecycle management).

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?

Three compact sentences with zero filler: core action first, return value second, mandatory guardrail behavior third. The spend-cap explanation is slightly redundant with the schema's max_hourly_price text, but its placement in the description is justified because it is a required behavioral contract an agent must honor.

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?

Despite having no output schema, the return value is disclosed ('Returns the new contract/instance id'), and the operational flow from search_offers → create_instance is complete. With 9 parameters and a conditional nested object, the description adequately covers the volume logic. The only real omission is post-creation context — the created instance is a billable, persistent resource with no mention of how to stop/destroy it.

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 100%, so the schema fully documents all 9 parameters and the nested volume object — the baseline of 3 applies. The description mostly echoes schema content (offer_id from search_offers, max_hourly_price as a guardrail) rather than adding net-new meaning, so it neither improves nor degrades the parameter understanding.

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 opens with a specific verb and resource — 'Create (rent) a new instance on a specific machine offer' — and anchors the offer id to the search_offers sibling tool. It also mentions optional volume creation/attachment, which cleanly separates it from create_volume and list_volumes. An agent can tell exactly what this tool does without needing to open the schema.

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?

It states the prerequisite sequencing ('ask id from search_offers') and notes that volume attachment is optional, implying the create_volume/list_volumes path is an alternative. However, it never explicitly names alternatives or states when not to use this tool (e.g., 'if you only need a volume, use create_volume'), so some routing logic is left to inference.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.