claim
Lease a matching Android device or emulator for a coding-agent session; queue the request when none is free and poll the ticket until the lease is available.
Instructions
Claim a device matching the selector (empty = any usable device). waitSeconds > 0 queues the claim and returns a ticket; re-call claim with that ticket to poll on the returned retryAfterMs cadence (5 s for MCP, or your own clamped proposal via retryAfterMs) until a matching device frees up, then the poll returns the lease. A ticket is skipped by dispatch once it is a few intervals stale, and dropped entirely after ~30 s of silence.
Tool call template
This tool declares no required parameters. Add optional parameters from the input schema as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {},
"name": "claim"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| owner | No | override the derived mcp: owner | |
| ticket | No | poll a queued claim: re-call claim with the ticket to pick up the device | |
| selector | No | Any combo of serial, model, os (minimum version), transport (usb|wifi|emulator), avd | |
| ttlSeconds | No | lease TTL, default 1800 | |
| waitSeconds | No | queue wait in seconds; >0 returns a ticket to poll, 0 = fail fast, capped at 600 | |
| retryAfterMs | No | proposed poll interval in ms; clamped to 1000–10000, default 5000 |