Skip to main content
Glama

List Devices

mobile_list_available_devices
Read-only

Lists available iOS and Android devices and simulators for mobile automation testing, enabling users to select a target device.

Instructions

List all available devices. This includes both physical devices and simulators. If there is more than one device returned, you need to let the user select one of them.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
noParamsYes

Implementation Reference

  • Handler function that lists available devices by querying iOS, Android managers and simulators, categorizing them into iOS simulators, iOS devices, Android mobile, Android TV, and formats a response string.
    async ({}) => {
    	const iosManager = new IosManager();
    	const androidManager = new AndroidDeviceManager();
    	const simulators = simulatorManager.listBootedSimulators();
    	const simulatorNames = simulators.map(d => d.name);
    	const androidDevices = androidManager.getConnectedDevices();
    	const iosDevices = await iosManager.listDevices();
    	const iosDeviceNames = iosDevices.map(d => d.deviceId);
    	const androidTvDevices = androidDevices.filter(d => d.deviceType === "tv").map(d => d.deviceId);
    	const androidMobileDevices = androidDevices.filter(d => d.deviceType === "mobile").map(d => d.deviceId);
    
    	const resp = ["Found these devices:"];
    	if (simulatorNames.length > 0) {
    		resp.push(`iOS simulators: [${simulatorNames.join(".")}]`);
    	}
    
    	if (iosDevices.length > 0) {
    		resp.push(`iOS devices: [${iosDeviceNames.join(",")}]`);
    	}
    
    	if (androidMobileDevices.length > 0) {
    		resp.push(`Android devices: [${androidMobileDevices.join(",")}]`);
    	}
    
    	if (androidTvDevices.length > 0) {
    		resp.push(`Android TV devices: [${androidTvDevices.join(",")}]`);
    	}
    
    	return resp.join("\n");
    }
  • src/server.ts:149-185 (registration)
    Tool registration call that defines the name, description, empty input schema (noParams = z.object({})), and references the handler function.
    tool(
    	"mobile_list_available_devices",
    	"List all available devices. This includes both physical devices and simulators. If there is more than one device returned, you need to let the user select one of them.",
    	{
    		noParams
    	},
    	async ({}) => {
    		const iosManager = new IosManager();
    		const androidManager = new AndroidDeviceManager();
    		const simulators = simulatorManager.listBootedSimulators();
    		const simulatorNames = simulators.map(d => d.name);
    		const androidDevices = androidManager.getConnectedDevices();
    		const iosDevices = await iosManager.listDevices();
    		const iosDeviceNames = iosDevices.map(d => d.deviceId);
    		const androidTvDevices = androidDevices.filter(d => d.deviceType === "tv").map(d => d.deviceId);
    		const androidMobileDevices = androidDevices.filter(d => d.deviceType === "mobile").map(d => d.deviceId);
    
    		const resp = ["Found these devices:"];
    		if (simulatorNames.length > 0) {
    			resp.push(`iOS simulators: [${simulatorNames.join(".")}]`);
    		}
    
    		if (iosDevices.length > 0) {
    			resp.push(`iOS devices: [${iosDeviceNames.join(",")}]`);
    		}
    
    		if (androidMobileDevices.length > 0) {
    			resp.push(`Android devices: [${androidMobileDevices.join(",")}]`);
    		}
    
    		if (androidTvDevices.length > 0) {
    			resp.push(`Android TV devices: [${androidTvDevices.join(",")}]`);
    		}
    
    		return resp.join("\n");
    	}
    );
  • Shared empty schema object used as input parameters for tools with no arguments, including mobile_list_available_devices.
    const noParams = z.object({});
Behavior3/5

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

Annotations declare readOnlyHint=true, indicating a safe read operation. The description adds context about including physical devices and simulators and the need for user selection if multiple devices are returned, which is useful beyond annotations. However, it doesn't detail behavioral aspects like rate limits, pagination, or error handling.

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 two sentences, front-loaded with the core purpose and followed by a practical note on user selection. Every sentence adds value without redundancy, making it efficient and well-structured.

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?

Given the tool's low complexity (no meaningful parameters, read-only operation), annotations cover safety, and the description adds necessary context about device types and user interaction. Without an output schema, it could benefit from details on return format, but it's largely complete for a simple list tool.

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?

The input schema has one parameter (noParams) with 0% description coverage, but the description compensates by implying no parameters are needed for listing devices. Since there are effectively 0 meaningful parameters, the baseline is 4, as the description adequately conveys that no inputs are required.

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?

The description clearly states the verb ('List') and resource ('available devices'), specifying it includes both physical devices and simulators. It distinguishes from siblings like mobile_list_apps by focusing on devices rather than apps, though it doesn't explicitly contrast with all sibling tools.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description implies usage when needing to list devices, with a note about user selection if multiple are returned, but lacks explicit guidance on when to use this vs. alternatives like mobile_get_screen_size or prerequisites. It provides some context but no clear exclusions or named alternatives.

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

Install Server

Other Tools

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/EmpathySlainLovers/MCP'

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