mobile_type_keys
Type text into the focused element and optionally submit it using the enter key, facilitating automated mobile app interactions on iOS and Android via the Mobile Next MCP server.
Instructions
Type text into the focused element
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| submit | Yes | Whether to submit the text. If true, the text will be submitted as if the user pressed the enter key. | |
| text | Yes | The text to type |
Implementation Reference
- src/server.ts:372-381 (handler)Handler function that types the provided text into the focused element on the selected device using the robot's sendKeys method. Optionally presses the ENTER button if submit is true.async ({ text, submit }) => { requireRobot(); await robot!.sendKeys(text); if (submit) { await robot!.pressButton("ENTER"); } return `Typed text: ${text}`; }
- src/server.ts:368-371 (schema)Zod schema defining the input parameters: 'text' (string) and 'submit' (boolean optional).{ text: z.string().describe("The text to type"), submit: z.boolean().describe("Whether to submit the text. If true, the text will be submitted as if the user pressed the enter key."), },
- src/server.ts:365-382 (registration)Registration of the 'mobile_type_keys' tool using the internal tool wrapper, which registers it with the MCP server, including name, description, schema, and handler.tool( "mobile_type_keys", "Type text into the focused element", { text: z.string().describe("The text to type"), submit: z.boolean().describe("Whether to submit the text. If true, the text will be submitted as if the user pressed the enter key."), }, async ({ text, submit }) => { requireRobot(); await robot!.sendKeys(text); if (submit) { await robot!.pressButton("ENTER"); } return `Typed text: ${text}`; } );