Skip to main content
Glama
TiagoDanin

Android Debug Bridge MCP

by TiagoDanin

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'],
      },
    },
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations provided, the description carries full burden but offers minimal behavioral insight. It states the action ('input text') but doesn't disclose whether this requires specific conditions (e.g., an active field), how it handles errors, or what the expected outcome is. This is inadequate for a mutation tool with zero annotation coverage.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single, efficient sentence with zero waste—'Input text into the current field' is front-loaded and appropriately sized for a simple tool. Every word earns its place, making it easy to parse quickly.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the tool's simplicity (1 parameter, 100% schema coverage) but lack of annotations and output schema, the description is incomplete. It doesn't address behavioral aspects like what 'current field' means, potential side effects, or error handling, which are crucial for an input mutation tool.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100%, with the single parameter 'text' well-documented in the schema as 'Text to input'. The description adds no additional meaning beyond this, such as format constraints or examples, so it meets the baseline of 3 where the schema does the heavy lifting.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description 'Input text into the current field' clearly states the action (input) and target (current field), making the purpose immediately understandable. However, it doesn't differentiate from sibling tools like 'input_keyevent' or 'input_tap' that also perform input operations but with different methods.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides no guidance on when to use this tool versus alternatives like 'input_keyevent' for keyboard events or 'input_tap' for touch inputs. It lacks any context about prerequisites (e.g., needing a field to be focused) or exclusions, leaving usage entirely implicit.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

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