Skip to main content
Glama

input_text

Enter text into active fields on Android devices during automation and testing. This tool simulates keyboard input to interact with apps and UI elements.

Instructions

Input text into the current field

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
textYesText to input

Implementation Reference

  • The handler function for the 'input_text' tool. It extracts the 'text' from args, escapes double quotes, executes ADB input text command, sends ENTER keyevent, captures UI dump, and returns confirmation with UI content.
    input_text: async (args: any) => { const { text } = args as { text: string }; const escapedText = text.replace(/"/g, '\\"'); await executeCommand(`adb shell input text "${escapedText}"`); await executeCommand(`adb shell input keyevent 66`); const uiContent = await captureUIContent(false); return { content: [ { type: 'text', text: `Text input: ${text}`, }, ...uiContent, ], }; },
  • The tool definition including name, description, and input schema for 'input_text', which requires a 'text' string.
    { name: 'input_text', description: 'Input text into the current field', inputSchema: { type: 'object', properties: { text: { type: 'string', description: 'Text to input', }, }, required: ['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/TiagoDanin/Android-Debug-Bridge-MCP'

If you have feedback or need assistance with the MCP directory API, please join our Discord server