import { z } from 'zod';
import { goHome } from '../executor/wda.js';
export const wdaHomeSchema = z.object({
port: z.number().optional().describe('WDA server port (default: 8100)'),
});
export type WdaHomeInput = z.infer<typeof wdaHomeSchema>;
export const wdaHomeTool = {
name: 'wda_home',
description: 'Press the home button to go to the home screen.',
inputSchema: wdaHomeSchema,
handler: async (input: WdaHomeInput) => {
const options = { port: input.port };
await goHome(options);
return {
content: [
{
type: 'text' as const,
text: 'Pressed home button',
},
],
};
},
};