Skip to main content
Glama
rahulkr
by rahulkr

input_text

Send text input to Android devices for automated testing, debugging, and development workflows. Type text into focused fields to simulate user interactions during app testing.

Instructions

Type text into the currently focused field

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
textYes
device_serialNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Implementation Reference

  • Handler function for the 'input_text' tool. It escapes the input text for shell safety and executes an ADB shell input text command to type into the currently focused field on the Android device.
    @mcp.tool()
    def input_text(text: str, device_serial: str | None = None) -> str:
        """Type text into the currently focused field"""
        # Escape special characters for shell
        escaped = text.replace(" ", "%s").replace("&", "\\&").replace("<", "\\<").replace(">", "\\>")
        return run_adb(["shell", "input", "text", escaped], device_serial)
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 only states the action without disclosing behavioral traits like whether this simulates keyboard input, whether it overwrites existing text, if there are rate limits, or what happens on failure. For a mutation tool with zero annotation coverage, this is a significant gap in behavioral disclosure.

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 that communicates the core purpose without any wasted words. It's appropriately sized for a straightforward tool and front-loads the essential information.

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

Completeness3/5

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

Given the tool's relative simplicity (2 parameters, no annotations but with output schema), the description covers the basic action but lacks important context about how it works, error conditions, or interaction patterns. The presence of an output schema helps, but for a mutation tool that interacts with UI elements, more behavioral context would be beneficial.

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 0%, so the schema provides no parameter descriptions. The tool description doesn't mention any parameters, leaving both 'text' and 'device_serial' completely undocumented. However, with only 2 parameters and an output schema present, the baseline is 3 as the description doesn't add value but the schema structure is simple.

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

Purpose5/5

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

The description clearly states the specific action ('Type text') and target ('into the currently focused field'), distinguishing it from sibling tools like 'clear_text_field' or 'tap_element'. It uses precise verb+resource language that leaves no ambiguity about its function.

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

Usage Guidelines3/5

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

The description implies usage context ('currently focused field') but doesn't explicitly state when to use this versus alternatives like 'tap_element' followed by input_text, or clarify prerequisites like needing a field to be focused first. It provides basic contextual guidance but lacks explicit alternatives or exclusions.

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/rahulkr/r_adb_mcp_server'

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