Skip to main content
Glama

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
NameRequiredDescriptionDefault
submitYesWhether to submit the text. If true, the text will be submitted as if the user pressed the enter key.
textYesThe text to type

Implementation Reference

  • 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}`; }
  • 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}`; } );

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