Skip to main content
Glama

native-devtools-status

Check if native devtools are ready for a specific app before using native hierarchy or network tools. Get connection state and the exact remedy—restart app, wait, or restart server.

Instructions

Check whether native devtools are connected to a specific app and whether the next launch is prepared for injection. Use when you need to verify native devtools readiness before calling native-full-hierarchy, native-describe-screen, or native-network-logs.

Returns { envSetup, appRunning, connected, requiresRestart, state, message, nextLaunchWillBeInjected, injectable }:

  • envSetup: DYLD_INSERT_LIBRARIES is configured in the simulator's launchd environment

  • appRunning: the target bundle currently has a running UIKit process on the simulator

  • connected: the dylib is active in the current running process for this bundleId

  • requiresRestart: the app is already running and a fresh process would reach this simulator's devtools endpoint where the current one does not — it carries no argent injection, was pointed at an earlier tool-server's listener, or could not be inspected to tell. Always false for a non-injectable app, and false when state is unregistered or connecting, where a relaunch cannot help.

  • state: why devtools are or aren't live, measured from the running process. "connected"; "not_running"; "stale_process" (the process cannot reach this simulator's devtools endpoint — launched either before argent's instrumentation was in place or against an earlier tool-server's listener — so restart-app fixes it); "unregistered" (the process IS injected and pointed at this simulator's devtools endpoint yet the service never registered it, so restarting the app cannot help); "connecting" (the process IS injected but launched moments ago and is still connecting, so waiting is what helps); "indeterminate" (the process could not be inspected). Omitted when injectable is false, which is terminal on its own.

  • message: the remedy for that state, in full. Omitted when connected or non-injectable. Prefer it over inferring one from the booleans — it is the only field that can tell you to stop restarting the app.

  • nextLaunchWillBeInjected: if you launch this bundle now, native devtools env setup is already in place (always false for a non-injectable app)

  • injectable: whether this app is a supported target for Argent native devtools. Apple system apps (bundle ids under com.apple.) are not: they are never the app under test, so the native tools refuse to read one.

Call this before using app-scoped native hierarchy tools or native-network-logs. If injectable is false: treat this as TERMINAL — the app is not a supported native-devtools target, and no relaunch changes that. Do NOT restart/retry. Use the standard describe tool (its accessibility path reads the screen without injection) or screenshot (then interact by coordinate). Do not fall back to the native-devtools feature tools (native-describe-screen, native-find-views, native-full-hierarchy, native-network-logs, native-view-at-point, native-user-interactable-view-at-point) — they run the same injection precheck and fail with the same non-injectable error. If appRunning is false and nextLaunchWillBeInjected is true: use launch-app normally. If requiresRestart is true: call restart-app once, then proceed with the native feature. Read state before acting on a second such reading — indeterminate reaches this rule too, and its line below bounds it at that one restart. If state is unregistered: do NOT restart the app again — it already launched under the terms a restart would recreate. Restart the tool-server (argent server stop && argent server start --detach), then retry. If it reads unregistered again after that restart, stop: the process loads argent's dylib but never dials, and no further restart on either side changes it — treat native devtools as unavailable, then use describe or screenshot and drive by coordinate. If state is connecting: do NOT restart the app — launching it is what starts the connection, so a relaunch discards the one in progress and returns this same state. Wait a few seconds and repeat this call. If state is indeterminate: the process could not be inspected, so restart-app is worth one attempt. If this call still reports it after that restart, do NOT restart the app again — the service is stale rather than the app uninjected, so restart the tool-server (argent server stop && argent server start --detach) and retry. Remote simulators can never inspect the process, so this is the only unconnected state a running app reaches there. Returns { status: "init_failed", message, attempts } instead when the simulator's native-devtools environment failed to initialize. Fails if the simulator server is not running for the given UDID.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
udidYesSimulator UDID
bundleIdYesBundle ID of the app to check (e.g. com.example.MyApp)

Schema Changelog

Changes observed during successful MCP inspections. Dates show when Glama detected each change.

  1. First observedv0.15.0

TDQS

A4.7/5.0
Behavior5/5

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

With no annotations, the description carries the full behavioral burden, and it meets it thoroughly. It explains every returned field, each possible state, the meaning of requiresRestart, terminal non-injectable behavior, and the init_failed alternative return. It also discloses failure conditions such as the simulator server not running and remote simulator limitations.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is long but every section earns its place: purpose, return contract, state semantics, then actionable decision rules. It is front-loaded with the core purpose and structured so the agent can quickly locate the branch relevant to its observed state. There is no filler or redundant framing.

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?

The description is effectively a complete operational spec for a two-parameter diagnostic tool. It defines all return fields, enumerates every state and its remedy, distinguishes terminal from recoverable conditions, and documents the failure return. Since there is no output schema, this in-description documentation is essential and fully supplied.

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

Parameters3/5

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

The input schema already covers both parameters with 100% description coverage: udid is 'Simulator UDID' and bundleId is 'Bundle ID of the app to check.' The description references bundleId and the simulator server context but adds little semantic detail beyond the schema. Baseline 3 is appropriate because the schema does the heavy lifting.

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?

The description opens with a specific verb and resource: 'Check whether native devtools are connected to a specific app and whether the next launch is prepared for injection.' It clearly names the downstream native tools that depend on this readiness check, so an agent can distinguish it from siblings without opening their schemas.

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?

The description gives explicit when-to-use guidance ('Call this before using app-scoped native hierarchy tools or native-network-logs') and a detailed decision tree covering each state. It also names non-native alternatives like describe and screenshot, and explicitly forbids retrying native feature tools when injectable is false. This is exemplary usage guidance.

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

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/software-mansion/argent'

If you have feedback or need assistance with the MCP directory API, please join our Discord server