Skip to main content
Glama
mobile-next

Mobile Next MCP Server

Official
by mobile-next

Set Orientation

mobile_set_orientation
Destructive

Change mobile device screen orientation between portrait and landscape modes for testing and automation purposes.

Instructions

Change the screen orientation of the device

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
deviceYesThe device identifier to use. Use mobile_list_available_devices to find which devices are available to you.
orientationYesThe desired orientation

Implementation Reference

  • Handler function that retrieves the robot for the specified device and calls setOrientation on it.
    async ({ device, orientation }) => {
    	const robot = getRobotFromDevice(device);
    	await robot.setOrientation(orientation);
    	return `Changed device orientation to ${orientation}`;
    }
  • Zod schema defining the input parameters: device (string) and orientation (enum: portrait or landscape).
    {
    	device: z.string().describe("The device identifier to use. Use mobile_list_available_devices to find which devices are available to you."),
    	orientation: z.enum(["portrait", "landscape"]).describe("The desired orientation"),
    },
  • src/server.ts:582-595 (registration)
    Tool registration call that defines the name, description, schema, and handler for mobile_set_orientation.
    tool(
    	"mobile_set_orientation",
    	"Set Orientation",
    	"Change the screen orientation of the device",
    	{
    		device: z.string().describe("The device identifier to use. Use mobile_list_available_devices to find which devices are available to you."),
    		orientation: z.enum(["portrait", "landscape"]).describe("The desired orientation"),
    	},
    	async ({ device, orientation }) => {
    		const robot = getRobotFromDevice(device);
    		await robot.setOrientation(orientation);
    		return `Changed device orientation to ${orientation}`;
    	}
    );
Behavior3/5

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

The annotations include destructiveHint=true, indicating this is a mutation. The description confirms this with 'Change,' aligning with annotations. It adds minimal behavioral context beyond annotations—no details on side effects, permissions, or error handling—but doesn't contradict annotations, so it meets the lower bar with annotations present.

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, direct sentence with zero wasted words. It front-loads the core action and resource efficiently, making it easy to parse without unnecessary elaboration.

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 moderate complexity (a destructive operation with two parameters) and no output schema, the description is minimal but adequate. It covers the basic purpose but lacks details on usage context, error cases, or behavioral nuances, leaving some gaps in completeness.

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 clear descriptions for both parameters (device identifier and orientation enum). The description adds no extra parameter semantics beyond what the schema provides, so it defaults to the baseline score of 3 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 ('Change') and resource ('screen orientation of the device'), making the purpose immediately understandable. However, it doesn't explicitly differentiate from sibling tools like mobile_get_orientation (which retrieves rather than sets orientation), missing full sibling distinction.

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. It doesn't mention prerequisites (e.g., needing a device identifier from mobile_list_available_devices) or contrast with related tools like mobile_get_orientation, leaving usage context implied but not stated.

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