MCP / Tool reference
fleetdeck_acquire
Acquire an exclusive automation session. A busy device fails instead of mixing agents' input.
Parameters
deviceIdstringrequiredExact device ID from List devices. The current key must grant access to this phone.
"device_123"Validation pattern
^[A-Za-z0-9._:-]+$ttlSecondsintegeroptionalRequested session lifetime in seconds. Credential expiry can shorten the returned lease. Renew before expiresAt.
120120Unknown fields are rejected.
View JSON Schema
{
"type": "object",
"properties": {
"deviceId": {
"type": "string",
"minLength": 1,
"maxLength": 128,
"pattern": "^[A-Za-z0-9._:-]+$"
},
"ttlSeconds": {
"type": "integer",
"minimum": 30,
"maximum": 900,
"default": 120
}
},
"required": [
"deviceId"
],
"additionalProperties": false,
"$schema": "http://json-schema.org/draft-07/schema#"
}Call example
const result = await client.callTool({
name: "fleetdeck_acquire",
arguments: {
"deviceId": "device_123",
"ttlSeconds": 120
}
});
if (result.isError) {
console.error(result.content);
} else {
console.log(result.content);
}The SDK example assumes an initialized MCP client. See connection setup for HTTP authentication, initialization and stdio configuration.
Response
The result contains content blocks and isError. The text block contains JSON with the fields below. See the corresponding REST response contract.
{
"content": [
{
"type": "text",
"text": "{\n \"id\": \"session_123\",\n \"deviceId\": \"device_123\",\n \"expiresAt\": \"2030-01-01T10:00:00.000Z\"\n}"
}
],
"isError": false
}idstringalways presentUnique identifier of this resource. Use the returned value in subsequent requests.
Validation pattern
^[A-Za-z0-9._:-]+$deviceIdstringalways presentExact device ID from List devices. The current key must grant access to this phone.
Validation pattern
^[A-Za-z0-9._:-]+$expiresAtstringalways presentUTC instant when this lease or credential expires. Read each renewal response for the current deadline.
Behavior
- The MCP descriptor marks this tool as potentially destructive and non-idempotent. The requestId protects action identity, not the external app effect.
- FleetDeck handler errors return isError=true with a JSON text payload. SDK input validation may return plain-text error content, and authentication or transport can fail before a tool result exists. Screenshot results place image content in MCP image blocks and omit those bytes from the parallel JSON block.
Errors
401UNAUTHORIZEDMissing, malformed, expired or revoked credential; user verification/password state can also deny access.
Recovery: Use Authorization: Bearer with a valid scoped key. For dashboard routes, sign in. Job children require an active parent job and timely renewal.
Full error reference ↗403FORBIDDENRequired scope, device grant, account membership or worker identity is missing.
Recovery: Check the endpoint’s scopes, exact device, owning key and workerId. A different key cannot access the original key’s sessions or jobs.
Full error reference ↗404NOT_FOUNDUnknown route or resource unavailable to this caller.
Recovery: Check method/path and use returned IDs from this account/key. Do not guess IDs.
Full error reference ↗402PLAN_REQUIREDDevice account has no active entitlement.
Recovery: Restore an active device entitlement in the workspace before controlling it.
Full error reference ↗409DEVICE_BUSYAnother automation session, touch run or in-flight action owns the phone.
Recovery: Wait for its release/expiry and any running lease. Coordinate operators; do not create parallel controls.
Full error reference ↗422VALIDATIONA field, type, bound or unknown property failed validation.
Recovery: Read issues[].path and issues[].message. Match the endpoint schema; strict objects reject extra fields.
Full error reference ↗Client onlyCONNECTION_FAILEDThe client could not reach the configured FleetDeck origin.
Recovery: Check DNS, TLS, proxy/firewall and FLEETDECK_BASE_URL. Before replaying a mutation, query its saved requestId when connectivity returns.
Full error reference ↗Client onlyINVALID_RESPONSEThe server response was not valid FleetDeck JSON.
Recovery: Check that the base URL points to FleetDeck and that a proxy did not replace the response. Preserve the original action identifiers before retrying.
Full error reference ↗500INTERNALUnexpected service error.
Recovery: Save nonsecret request context and time for support. Query action status before repeating a mutation; never assume it did not execute.
Full error reference ↗SDK validation can return plain-text error content. Authentication and transport may fail before a tool result exists. Read the JSON-RPC and transport error reference before parsing the text as JSON.
Annotations
| Annotation | Value |
|---|---|
readOnlyHint | false |
destructiveHint | true |
idempotentHint | false |
openWorldHint | true |
