Skip to main content
Glama

Acquire a machine

relay_acquire

Lease a fresh VM from an image or a durable Mac by name, with task, TTL and declared extractions, to start recorded, snapshot-evidenced work in a session guest.

Instructions

Acquire one machine, a guest, and start its ownership heartbeat: a fresh VM from image (a key from relay_probe or relay_search), or a durable machine, a real Mac leased whole, by machine (its name as machctl list shows it, such as Build-Mac-1). Give exactly one of them. A durable machine is on the home network and not isolated from it, a CI job may share its desktop, it has no console (vnc is refused), and its runs take snapshots only while its cua-driver daemon holds Screen Recording; every other call works on it as on a VM. The result's guest is the guest's name in this session, such as login-test-1; every later call on this guest names it with guest. Requires task (a short slug), image or machine, and extractions: every output you intend to bring home, declared before any work ([] is allowed; nothing is extracted automatically). Optional ttlHours (default 4), env (a credential pack, never baked into images), fullWorkspace (opt in to deliver the whole workspace) and vnc (default false; only prepares console-sharing capacity, never opens a viewer). Acquire one guest for each machine the work needs: several guests may run at once, each with its own lease, evidence and finish, up to the session's limit (relay_status reports maxGuests, MCP_RELAY_MAX_GUESTS, default 4); an acquisition beyond it is refused with the names of the guests held. When the host is at capacity, such as at its limit on running macOS VMs, or the durable machine is leased by someone else, the acquisition waits for it, asking again every 15 s for up to MCP_RELAY_CAPACITY_WAIT (30 minutes by default), and the result's waitedForCapacityMs says how long it waited; once the wait runs out it is refused with the backend's reason and the time waited. The backend's other refusals pass through at once. Continue with relay_stage, relay_script, relay_image/relay_extract, then relay_finish or relay_release explicitly before you return; a failed step keeps the VM for repair rather than replaying uncertain input.

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": {
      "task": "<task>",
      "extractions": "<extractions>"
    },
    "name": "relay_acquire"
  }
}

Input Schema

NameRequiredDescriptionDefault
envNoCredential pack, default none; never baked into images.
vncNoPrepare guest console sharing, default false. Never opens a viewer automatically.
taskYes
imageNoImage key from relay action=probe, e.g. ubuntu2404 or macos26, for a fresh VM. Give exactly one of image and machine.
machineNoA durable machine, a real Mac leased whole, by the name machctl list shows, e.g. Build-Mac-1. Give exactly one of image and machine.
ttlHoursNo
extractionsYes
fullWorkspaceNoExplicit opt-in to deliver the entire workspace.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed3 schema fields changedv0.17.0
    • changedInput schema / properties / image / description
      Previous value: -"Image key from relay action=probe, e.g. ubuntu2404 or macos26."New value: +"Image key from relay action=probe, e.g. ubuntu2404 or macos26, for a fresh VM. Give exactly one of image and machine."
    • addedInput schema / properties / machine
      Added value: +{
      +  "description": "A durable machine, a real Mac leased whole, by the name machctl list shows, e.g. Build-Mac-1. Give exactly one of image and machine.",
      +  "pattern": "^[A-Za-z0-9][A-Za-z0-9._-]{0,63}$",
      +  "type": "string"
      +}
    • changedInput schema / required
      Previous value: -[
      -  "task",
      -  "image",
      -  "extractions"
      -]New value: +[
      +  "task",
      +  "extractions"
      +]
  2. Addedv0.5.1

TDQS

A4.9/5.0
Behavior5/5

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

Annotations only declare the safety profile (not read-only, not idempotent, not destructive, closed-world); the description adds genuinely new behavioral context beyond them: durable machines are on the home network, shareable desktop, refuse `vnc`, and only snapshot while the cua-driver holds Screen Recording; credentials are never baked into images; nothing is extracted automatically; a failed step keeps the VM rather than replaying input. It also discloses the capacity-wait timing and that `waitedForCapacityMs` reports the wait.

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?

The core action and the image-vs-machine choice are front-loaded, and nearly every sentence carries non-redundant information. It is a single dense block of long compound sentences, though — the durable-machine caveats and the capacity-wait mechanics would scan far better as separate lines, and a couple of sentences chain four or five clauses.

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?

No output schema exists, and the description compensates by naming the result fields an agent must retain (`guest` as the session handle for all later calls, `waitedForCapacityMs`) and by spelling out refusal behavior. For an 8-parameter, two-mode acquisition tool this is complete enough to call correctly without further discovery.

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

Parameters5/5

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

Schema coverage is 63%, so the description must carry weight, and it does: `task` is a short slug, `image` is a key from relay_probe/relay_search, `machine` uses the name machctl list shows (Build-Mac-1), `extractions` must be declared before any work with `[]` allowed, `ttlHours` defaults to 4, `env` is a credential pack never baked into images, `fullWorkspace` is an explicit opt-in, and `vnc` only prepares console capacity and never opens a viewer. That maps meaning onto every parameter, including the two undocumented in the schema (`task`, `ttlHours`).

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 — acquire one machine (guest) and start its ownership heartbeat — and immediately splits it into the two mutually exclusive modes: a fresh VM from `image` or a durable machine via `machine`. It explicitly names the sibling tools that supply the identifiers (relay_probe, relay_search), so an agent can tell this apart from the lookup tools without opening a 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 selection rules ("Give exactly one of them"), cardinality guidance ("Acquire one guest for each machine the work needs... up to the session's limit"), and a full continuation path (relay_stage, relay_script, relay_image/relay_extract, then relay_finish or relay_release explicitly before returning). It also covers the failure/wait cases: capacity waits, the 15 s retry, the MCP_RELAY_CAPACITY_WAIT ceiling, and when a refusal is immediate versus delayed.

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