Skip to main content
Glama

Rent a GPU machine

rent_gpu
Idempotent

Rent one machine found by search_gpus, for work you run yourself over SSH (training, fine-tuning, batch jobs). To serve a model, use plan_deploy then deploy_model instead: one call sets up the machine, the engine and an OpenAI-compatible endpoint. COSTS MONEY: price per GPU-hour x GPUs, paid an hour at a time from when it starts running (booting is free) until terminate_instance or termination_hours, whichever comes first; worst_case_usd in the result is the most it can cost, and balance_covers_hours says how many hours the balance pays. It rents every GPU on the machine unless gpu_count says fewer (only some hosts allow that). Pass max_price_per_gpu_hour, normally the price search_gpus showed: if the live price is higher nothing is rented and the error gives the new price. Spot machines can be taken back by their host at any time. Boots the Arrakis PyTorch image unless template_id (list_images) or a public image is given; uses ssh_public_key, else ssh_key_id, else the account's first SSH key. Returns instance_id, state, the locked price, worst_case_usd and what to do next. Besides SSH the machine opens ports 8000, 8888, 7860, 8080, 3000, 6006, 8501, 5000, 8188, 11434 to the internet (or the ones in ports); get_instance says where each answers. Calling again with the same idempotency_key, or the same node_id and name within 10 minutes, returns the same machine instead of renting a second; use a new name for a second machine.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "node_id": "<node_id>",
      "name": "<name>",
      "termination_hours": "<termination_hours>"
    },
    "name": "rent_gpu"
  }
}

Input Schema

NameRequiredDescriptionDefault
nameYesA name you will recognise.
imageNoOr any public image as docker pull takes it, e.g. vllm/vllm-openai:v0.11.0 or nvcr.io/nvidia/pytorch:25.01-py3 (x86-64). Checked with its registry before anything is charged. Not with template_id.
portsNoPorts inside the machine to open to the internet besides SSH. Default: 8000, 8888, 7860, 8080, 3000, 6006, 8501, 5000, 8188, 11434. [] opens only SSH. A service must listen on 0.0.0.0; get_instance gives each port's public url.
startNoWith image: idle (default) keeps the machine waiting for SSH; image runs the image's own command (server images such as vLLM). Reach a server with ssh -L 8000:localhost:8000.
node_idYesnode_id from search_gpus.
gpu_countNoGPUs to rent on that machine. Default: all of them (the whole machine); fewer works only on hosts that allow splitting.
ssh_key_idNoId of an SSH key saved on the account.
ssh_key_idsNoSeveral saved keys by id (list_ssh_keys): every one of them can log in, for example the person's and a teammate's.
template_idNoImage to boot: an id from list_images. Default: the Arrakis PyTorch image (SSH, login banner and tools built in).
ssh_public_keyNoYour SSH public key, for example the contents of ~/.ssh/id_ed25519.pub.
idempotency_keyNoReuse when retrying.
termination_hoursYesHours until the machine is removed automatically.
max_price_per_gpu_hourNoThe most to pay per GPU-hour (USD). If the live price is higher, nothing is rented.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • addedInput schema / properties / ports
      Added value: +{
      +  "description": "Ports inside the machine to open to the internet besides SSH. Default: 8000, 8888, 7860, 8080, 3000, 6006, 8501, 5000, 8188, 11434. [] opens only SSH. A service must listen on 0.0.0.0; get_instance gives each port's public url.",
      +  "items": {
      +    "maximum": 65535,
      +    "minimum": 1,
      +    "type": "integer"
      +  },
      +  "maxItems": 20,
      +  "type": "array"
      +}
  2. Changed1 schema field changed
    • addedInput schema / properties / ssh_key_ids
      Added value: +{
      +  "description": "Several saved keys by id (list_ssh_keys): every one of them can log in, for example the person's and a teammate's.",
      +  "items": {
      +    "type": "string"
      +  },
      +  "maxItems": 20,
      +  "type": "array"
      +}
  3. First observed

TDQS

A4.8/5.0
Behavior5/5

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

Goes well beyond the annotations by disclosing the full billing model (price per GPU-hour x GPUs, billed hourly from running, booting free, capped by terminate_instance/termination_hours), that spot machines can be reclaimed at any time, and that max_price_per_gpu_hour protects against a price rise rather than renting anyway. It also discloses image and SSH key precedence, the idempotency window (same idempotency_key, or same node_id and name within 10 minutes), and that ten ports are opened to the internet besides SSH.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Very dense but ordered sensibly: purpose, the competing path, cost, defaults, returns, idempotency. Every clause carries operational weight, though the single paragraph format and the packed port list make it heavier to scan than it needs to be.

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

Completeness5/5

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

With no output schema, the description still names what comes back (instance_id, state, locked price, worst_case_usd, balance_covers_hours, next steps) and points to get_instance for port URLs. For a 13-parameter paid provisioning call, an agent has everything needed to decide, call, and interpret the result.

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 descriptions already cover all 13 parameters, so the schema does the heavy lifting, but the description adds genuine semantics: max_price_per_gpu_hour should normally be the price search_gpus showed, and if live price is higher nothing rents and the error reports the new price; gpu_count defaults to every GPU and splitting is host-dependent. The SSH key precedence chain (ssh_public_key, else ssh_key_id, else the account's first key) is also stated only here.

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?

States a specific verb and resource ("Rent one machine found by search_gpus") and immediately scopes the workload it suits ("for work you run yourself over SSH"). It names the sibling it is not for serving models (plan_deploy then deploy_model), so an agent can separate the two without opening either schema.

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

Usage Guidelines5/5

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

Gives explicit when-to-use (training, fine-tuning, batch jobs over SSH) and when-not-to-use with the exact alternative path ("To serve a model, use plan_deploy then deploy_model instead"). It also routes to list_images and search_gpus for the inputs it needs.

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.

Resources