Skip to main content
Glama
TiagoDanin

Android Debug Bridge MCP

by TiagoDanin

list_apps

Find installed Android applications by searching for specific name patterns in app packages to identify and manage apps on connected devices.

Instructions

List installed apps matching a name pattern

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
app_nameYesName pattern to search for in app packages

Implementation Reference

  • The main handler function for the 'list_apps' tool. It takes an 'app_name' argument, runs an ADB command to list matching packages using 'pm list packages | findstr', and returns the result as a text content block.
    list_apps: async (args: any) => {
      const { app_name } = args as { app_name: string };    
      const result = await executeCommand(`adb shell pm list packages | findstr "${app_name}"`);
      
      return {
        content: [
          {
            type: 'text',
            text: result || 'No apps found matching the pattern',
          },
        ],
      };
    },
  • The JSON schema definition for the 'list_apps' tool, specifying the required 'app_name' string input.
      name: 'list_apps',
      description: 'List installed apps matching a name pattern',
      inputSchema: {
        type: 'object',
        properties: {
          app_name: {
            type: 'string',
            description: 'Name pattern to search for in app packages',
          },
        },
        required: ['app_name'],
      },
    },
  • src/index.ts:32-46 (registration)
    The MCP server request handler for calling tools (CallToolRequestSchema), which dispatches to the specific tool handler like 'list_apps' based on the 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}`);
      }
    });
  • src/index.ts:26-30 (registration)
    The MCP server request handler for listing tools (ListToolsRequestSchema), which returns all tool definitions including 'list_apps'.
    server.setRequestHandler(ListToolsRequestSchema, async () => {
      return {
        tools: toolDefinitions,
      };
    });
Behavior2/5

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

With no annotations provided, the description carries full burden for behavioral disclosure. While 'List' implies a read-only operation, it doesn't specify what 'matching' entails (exact match, substring, regex), whether results are filtered/limited, what format the output takes, or any performance/rate considerations. The description provides minimal behavioral context beyond the basic operation.

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 functionality without any wasted words. It's appropriately sized for a simple tool with one parameter and gets straight to the point with clear front-loaded information.

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 tool with no annotations and no output schema, the description is insufficiently complete. It doesn't describe what the output looks like (list format, fields included), any limitations on results, error conditions, or how the pattern matching works. The agent would need to guess about important behavioral aspects of this 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 parameter 'app_name' fully documented in the schema. The description adds the context that this is a 'name pattern to search for in app packages,' which slightly elaborates on the schema's description. However, it doesn't provide additional syntax examples, format details, or constraints beyond what the schema already states.

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 verb ('List') and resource ('installed apps') with the specific action of matching a name pattern. It distinguishes from obvious siblings like 'open_app' by focusing on listing/searching rather than launching apps. However, it doesn't explicitly differentiate from other potential list/search tools that might exist.

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, limitations, or compare with other search/list tools. The agent must infer usage from the name and description alone without explicit context.

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