adb-device
Manage Android device connections for development tasks, including listing devices, selecting targets, checking properties, and monitoring device health.
Instructions
Manage device connections.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| operation | Yes | ||
| deviceId | No |
Implementation Reference
- src/tools/adb-device.ts:131-144 (handler)The main handler for the 'adb-device' tool, which routes requests to specific operation implementations.
export async function handleAdbDeviceTool( input: AdbDeviceInput, 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, select, wait, properties, health-check", ); } return handler(input, context); } - src/tools/adb-device.ts:5-8 (schema)Schema definition for the inputs accepted by the 'adb-device' tool.
export const adbDeviceInputSchema = z.object({ operation: z.enum(["list", "select", "wait", "properties", "health-check"]), deviceId: z.string().optional(), }); - src/tools/adb-device.ts:146-166 (registration)Tool definition exported for registration, containing name, description, and input schema.
export const adbDeviceToolDefinition = { name: "adb-device", description: "Manage device connections.", inputSchema: { type: "object", properties: { operation: { type: "string", enum: ["list", "select", "wait", "properties", "health-check"], }, deviceId: { type: "string" }, }, required: ["operation"], }, annotations: { readOnlyHint: false, destructiveHint: false, idempotentHint: false, openWorldHint: false, }, };