Skip to content

Dynamic Tools

AutoMobile lets you control which public tools appear in tools/list by their exact, case-sensitive names. setToolEnabled is always available. Selection controls discovery only: a client can still invoke an omitted tool directly by name through tools/call:

{
  "name": "setToolEnabled",
  "arguments": { "toolName": "clipboard", "enabled": true }
}

Set enabled to false to omit a tool from discovery. An optional sessionUuid scopes the choice to a routing session. The choice persists across restarts.

Enabling several tools at once

Pass toolNames instead of toolName to declare a whole task’s toolset in one round-trip. The batch is all-or-nothing: an unknown name rejects the request before AutoMobile writes anything. AutoMobile accepts always-on names such as setToolEnabled, getAndroid, and getApple as no-ops and lists them in the response’s skipped field.

{
  "name": "setToolEnabled",
  "arguments": { "toolNames": ["sendKeys", "clipboard", "highlight"] }
}

Either spelling returns enabledTools — the user-configurable tools selected for discovery in the session after the call — so the resulting discovery set is visible without a second tools/list. If the write succeeds but the follow-up read of that set fails, the response returns enabledToolsError instead of enabledTools; the change was still applied. Confirm the resulting set with tools/list or a follow-up setToolEnabled call.

Declaring capabilities at device acquisition

getAndroid, getApple, and provisionDevice accept enableTools, applied while the session is minted, so acquisition and capability declaration are one call:

{
  "name": "getAndroid",
  "arguments": {
    "avdName": "Pixel_9",
    "enableTools": ["sendKeys", "clipboard", "highlight"]
  }
}

An unknown name rejects the call before any device work starts. Always-on names such as setToolEnabled, getAndroid, and getApple are no-ops reported in skipped.

getAndroid and getApple report both gatedTools (omitted from discovery) and enabledTools (the complement). The provisionDevice tool reports enabledTools and requires boot: true, since a no-boot provision mints no session to declare capabilities against.

Every tool they list is one the next tools/list will advertise. On an Apple Watch, Apple TV or Apple Vision Pro, both lists leave out tools that refuse that platform, so every listed tool can run on the acquired device. A direct tools/call can still invoke an omitted tool.

On a TV (an Android TV device or an Apple TV), acquiring the device also enables focusNavigate, since a TV navigates by D-pad focus. It then appears in enabledTools and tools/list. A startup --disable-tool focusNavigate, its environment equivalent, or an earlier setToolEnabled choice for the session wins over this. Other tools that are off by default stay off on a TV, as on any device, to keep tools/list short: executePlan, recordToolCalls, getLogs and provisionDevice among them. They appear in gatedTools; list them with enableTools at acquisition or with setToolEnabled, or call them by name.

If AutoMobile acquires the device but cannot save the capability declaration, the response keeps its session handle and adds an enableToolsError describing what did not land. Re-declare those tools with setToolEnabled.

Startup defaults

Use repeatable CLI flags or comma-separated environment variables:

auto-mobile --enable-tool clipboard --enable-tool sqlQuery
auto-mobile --disable-tool observe

export AUTOMOBILE_ENABLED_TOOLS=clipboard,sqlQuery
export AUTOMOBILE_DISABLED_TOOLS=observe

Names and casing must match the registered tool exactly. Unknown names and conflicts between configurable tools in the same layer fail startup. Always-on names such as setToolEnabled, getAndroid, and getApple are ignored with a startup log message because they have no configurable enable/disable state. Persisted session choices take precedence over CLI values, which take precedence over environment values and built-in defaults.

Some tools also require a process option such as --debug or --embedded-sdk. recordToolCalls needs no process option: setToolEnabled lists it, and its tool-call-recording feature flag is on by default. Its begin action requires a persistent MCP connection (the proxy / daemon MCP session). A one-shot auto-mobile --cli call returns success: false with an actionable error because its connection closes after the call and cannot hold a recording.

A call refused because a feature flag is off names the tool, the flag and both ways to turn it on, for example:

recordToolCalls is behind the 'tool-call-recording' feature flag, which is disabled. Enable it with `auto-mobile --daemon set-feature-flag tool-call-recording true` or in the IDE plugin under Settings > AutoMobile > Feature Flags, then retry the call.

A recordToolCalls recording retains successful explicit verification calls: systemTray list/find, getLogs, and observe, in their original order. Incidental probes such as keyboard detection and clipboard reads are omitted. Recording does not infer assertions from the result; add step expect checks to the exported plan yourself.

Debug-only tools (debug), recordToolCalls begin/end (tool-call-recording) and setDeviceState deviceCondition (device-condition) refuse this way. MCP clients cannot change a flag: it applies to the whole daemon, so an operator sets it from a shell or the IDE plugin.

Plan-only tools are never shown in public discovery.

If a tool is missing, check its exact name and required process options, then refresh discovery after the notifications/tools/list_changed notification.

Device-session recovery after a daemon restart

A shared-daemon restart ends every device session bound to its prior daemon instance. Do not retry or retarget the former session UUID: acquire a fresh session with getAndroid or getApple before continuing.