emulator-device
Manage Android emulators for testing and debugging applications through the replicant-mcp server. Create, start, control, and snapshot emulator instances to streamline development workflows.
Instructions
Manage Android emulators.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| operation | Yes | ||
| avdName | No | ||
| device | No | e.g., 'pixel_7' | |
| systemImage | No | ||
| snapshotName | No | ||
| emulatorId | No |
Implementation Reference
- src/tools/emulator-device.ts:161-174 (handler)The main handler function for the 'emulator-device' tool, which dispatches based on the 'operation' field.
export async function handleEmulatorDeviceTool( input: EmulatorDeviceInput, context: ServerContext ): Promise<Record<string, unknown>> { const handler = operations[input.operation]; if (!handler) { throw new ReplicantError( ErrorCode.INVALID_OPERATION, `Unknown operation: ${input.operation}`, "Valid operations: list, create, start, kill, wipe, snapshot-save, snapshot-load, snapshot-list, snapshot-delete", ); } return handler(input, context); } - src/tools/emulator-device.ts:5-22 (schema)Input schema validation definition for the 'emulator-device' tool.
export const emulatorDeviceInputSchema = z.object({ operation: z.enum([ "list", "create", "start", "kill", "wipe", "snapshot-save", "snapshot-load", "snapshot-list", "snapshot-delete", ]), avdName: z.string().optional(), device: z.string().optional(), systemImage: z.string().optional(), snapshotName: z.string().optional(), emulatorId: z.string().optional(), }); - src/tools/emulator-device.ts:176-210 (registration)Tool definition registration for 'emulator-device'.
export const emulatorDeviceToolDefinition = { name: "emulator-device", description: "Manage Android emulators.", inputSchema: { type: "object", properties: { operation: { type: "string", enum: [ "list", "create", "start", "kill", "wipe", "snapshot-save", "snapshot-load", "snapshot-list", "snapshot-delete", ], }, avdName: { type: "string" }, device: { type: "string", description: "e.g., 'pixel_7'" }, systemImage: { type: "string" }, snapshotName: { type: "string" }, emulatorId: { type: "string" }, }, required: ["operation"], }, annotations: { readOnlyHint: false, destructiveHint: true, idempotentHint: false, openWorldHint: false, }, };