Skip to main content
Glama
TiagoDanin

Android Debug Bridge MCP

by TiagoDanin

open_app

Launch Android applications by specifying their package name, enabling automated app testing and device control through ADB commands.

Instructions

Open an app using its package name and activity

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
package_nameYesFull package name of the app (e.g., com.example.app)

Implementation Reference

  • The main handler function for the 'open_app' tool. It extracts the package_name from args, runs 'adb shell monkey -p {package_name} 1' to launch the app, sleeps for 5 seconds, and returns a text confirmation.
    open_app: async (args: any) => {
      const { package_name } = args as { 
        package_name: string; 
      };
      
      await executeCommand(`adb shell monkey -p ${package_name} 1`);
      await sleep(5000);
      
      return {
        content: [
          {
            type: 'text',
            text: `App opened: ${package_name}`,
          },
        ],
      };
    },
  • The schema definition for the 'open_app' tool, specifying the input schema that requires a 'package_name' string.
    {
      name: 'open_app',
      description: 'Open an app using its package name and activity',
      inputSchema: {
        type: 'object',
        properties: {
          package_name: {
            type: 'string',
            description: 'Full package name of the app (e.g., com.example.app)',
          },
        },
        required: ['package_name'],
      },
    },
  • src/index.ts:26-30 (registration)
    Registration of tool list handler, which returns all tool definitions including 'open_app' schema.
    server.setRequestHandler(ListToolsRequestSchema, async () => {
      return {
        tools: toolDefinitions,
      };
    });
  • src/index.ts:32-46 (registration)
    Registration of tool call handler, which dispatches to the specific tool handler like 'open_app' based on name.
    server.setRequestHandler(CallToolRequestSchema, async (request) => {
      const { name, arguments: args } = request.params;
    
      try {
        const handler = toolHandlers[name as keyof typeof toolHandlers];
        if (!handler) {
          throw new McpError(ErrorCode.MethodNotFound, `Unknown tool: ${name}`);
        }
    
        return await handler(args);
      } catch (error) {
        const errorMessage = error instanceof Error ? error.message : String(error);
        throw new McpError(ErrorCode.InternalError, `Tool execution failed: ${errorMessage}`);
      }
    });
Behavior2/5

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

With no annotations, the description carries full burden but lacks behavioral details. It doesn't disclose if this requires specific permissions (e.g., accessibility services), whether it launches in foreground/background, error handling (e.g., if app isn't installed), or side effects (e.g., interrupting current tasks). 'Open' implies a mutation, but safety and operational context are missing.

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. It's front-loaded with the core action and uses clear terminology. 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?

For a mutation tool with no annotations and no output schema, the description is incomplete. It lacks details on behavior, error cases, or return values (e.g., success/failure indicators). Given the complexity of opening apps (which can fail or have side effects), more context is needed for safe and effective use.

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 parameter 'package_name' fully documented in the schema. The description adds minimal value by mentioning 'package name and activity' (though 'activity' isn't a parameter), but doesn't clarify semantics beyond the schema. Baseline 3 is appropriate as 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 clearly states the action ('Open') and target resource ('an app') with the mechanism ('using its package name and activity'). It distinguishes from siblings like 'list_apps' (which enumerates) and input tools (which interact with already-open apps). However, it doesn't explicitly contrast with all siblings, missing a perfect score.

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 on when to use this tool versus alternatives is provided. It doesn't mention prerequisites (e.g., app must be installed), when not to use it (e.g., for web apps), or alternatives like using 'input_tap' on an app icon. The description only states what it does, not when to apply it.

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