Skip to main content
Glama

adb_get_device_info

Retrieve detailed device information from Android devices connected via ADB, including specifications and status, for device management and automation tasks.

Instructions

Get detailed information about a specific device

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
deviceIdNoDevice ID (optional, uses default device if not specified)

Implementation Reference

  • The handler function that implements the core logic of the 'adb_get_device_info' tool by calling AdbClient.getDeviceInfo and formatting the response.
    async getDeviceInfo(deviceId?: string) {
      try {
        const deviceInfo = await this.adbClient.getDeviceInfo(deviceId);
        return {
          success: true,
          data: deviceInfo,
          message: `Device info retrieved for ${deviceInfo.id}`
        };
      } catch (error: any) {
        return {
          success: false,
          error: error.message,
          message: 'Failed to get device info'
        };
      }
    }
  • The input schema definition for the 'adb_get_device_info' tool, registered in the ListTools response.
    {
      name: 'adb_get_device_info',
      description: 'Get detailed information about a specific device',
      inputSchema: {
        type: 'object',
        properties: {
          deviceId: {
            type: 'string',
            description: 'Device ID (optional, uses default device if not specified)',
          },
        },
        required: [],
      },
    },
  • src/index.ts:435-436 (registration)
    The switch case that registers and dispatches calls to the 'adb_get_device_info' handler in the CallToolRequest handler.
    case 'adb_get_device_info':
      return await this.handleToolCall(this.deviceTools.getDeviceInfo(args?.deviceId as string));

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/richard0913/adb-mcp'

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