Skip to main content
Glama

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

NameRequiredDescriptionDefault
ownerNooverride the derived mcp: owner
ticketNopoll a queued claim: re-call claim with the ticket to pick up the device
selectorNoAny combo of serial, model, os (minimum version), transport (usb|wifi|emulator), avd
ttlSecondsNolease TTL, default 1800
waitSecondsNoqueue wait in seconds; >0 returns a ticket to poll, 0 = fail fast, capped at 600
retryAfterMsNoproposed poll interval in ms; clamped to 1000–10000, default 5000

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.2/5.0
Behavior5/5

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

With annotations only covering openWorld/destructive/idempotent flags, the description carries real behavioral weight: it discloses the ticket lifecycle, the 5 s polling cadence, that tickets are skipped once a few intervals stale, and that they are dropped after ~30 s of silence. That is exactly the kind of stateful, non-obvious contract the annotations cannot express.

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 is front-loaded in the first clause, and each sentence contributes new information. The middle sentence is long and stacks parentheticals, which costs some readability, but no sentence is filler.

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 six-parameter, nested-object, no-output-schema tool, the definition covers return values (ticket, then lease), polling behavior, and expiry semantics well. Remaining gaps are minor: the lease object's shape, TTL expiry consequences, and what happens on fail-fast when no device matches.

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 coverage is 100%, so the baseline is 3, but the description adds genuine meaning: the empty-selector default, the waitSeconds > 0 vs 0 branch, and how retryAfterMs interacts with the polling loop. Only owner is left entirely to the schema.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

"Claim a device matching the selector" gives a specific verb and resource, and the parenthetical "(empty = any usable device)" defines the degenerate case. What's missing is any explicit contrast with siblings such as queue or renew, so an agent must infer which acquisition path it wants.

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 clearly separates the two operating modes: waitSeconds > 0 queues and returns a ticket, while the fail-fast path is implied by the schema's "0 = fail fast". It also prescribes the polling loop and cadence, though it never states when to prefer this over the queue or renew siblings.

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