Skip to main content
Glama
mobile-next

Mobile Next MCP Server

Official
by mobile-next

Type Text

mobile_type_keys
Destructive

Type text into mobile app elements and optionally submit it for automated testing and interaction on iOS and Android devices.

Instructions

Type text into the focused element

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
deviceYesThe device identifier to use. Use mobile_list_available_devices to find which devices are available to you.
textYesThe text to type
submitYesWhether to submit the text. If true, the text will be submitted as if the user pressed the enter key.

Implementation Reference

  • The handler function for the mobile_type_keys tool. It retrieves the appropriate Robot instance for the device, sends the text keys to the focused element, and optionally submits by pressing ENTER.
    async ({ device, text, submit }) => {
    	const robot = getRobotFromDevice(device);
    	await robot.sendKeys(text);
    
    	if (submit) {
    		await robot.pressButton("ENTER");
    	}
    
    	return `Typed text: ${text}`;
    }
  • Zod input schema defining parameters: device (string), text (string), submit (boolean).
    {
    	device: z.string().describe("The device identifier to use. Use mobile_list_available_devices to find which devices are available to you."),
    	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:483-502 (registration)
    Registration of the 'mobile_type_keys' MCP tool using the internal 'tool()' helper, including title, description, schema, and handler callback.
    tool(
    	"mobile_type_keys",
    	"Type Text",
    	"Type text into the focused element",
    	{
    		device: z.string().describe("The device identifier to use. Use mobile_list_available_devices to find which devices are available to you."),
    		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 ({ device, text, submit }) => {
    		const robot = getRobotFromDevice(device);
    		await robot.sendKeys(text);
    
    		if (submit) {
    			await robot.pressButton("ENTER");
    		}
    
    		return `Typed text: ${text}`;
    	}
    );
Behavior3/5

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

The annotation destructiveHint=true already indicates this is a mutation operation. The description adds some context by specifying it types 'into the focused element,' which helps understand the scope, but doesn't disclose additional behavioral traits like error conditions, what happens if no element is focused, or interaction effects beyond the submit parameter.

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 directly states the tool's function without unnecessary words. It's appropriately sized and front-loaded with the core action, making it easy to understand quickly.

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 destructiveHint annotation and lack of output schema, the description is minimally adequate but could be more complete. It covers the basic action but doesn't address potential complexities like error handling, focus requirements, or how it integrates with other mobile tools, leaving some gaps for an agent to infer.

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?

With 100% schema description coverage, all parameters are well-documented in the schema itself. The description doesn't add any semantic meaning beyond what's in the schema, such as explaining how 'device' relates to typing or clarifying the 'submit' behavior further. This meets the baseline for high schema coverage.

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 clearly states the action ('Type text') and target ('into the focused element'), providing a specific verb+resource combination. However, it doesn't differentiate from sibling tools like mobile_press_button or mobile_click_on_screen_at_coordinates that might also input text in different ways.

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?

No guidance is provided about when to use this tool versus alternatives. The description doesn't mention prerequisites (like needing a focused element), when-not scenarios, or how this differs from other input methods available in the sibling tool list.

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/mobile-next/mobile-mcp'

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