get_memory_info
Retrieve memory usage data from Android devices to monitor app performance, identify resource consumption, and optimize memory management during development and testing.
Instructions
Get memory usage information
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| package_name | No | ||
| device_serial | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |
Implementation Reference
- src/adb_mcp_server/server.py:774-780 (handler)The handler function for the 'get_memory_info' tool. It is registered via the @mcp.tool() decorator. Executes ADB shell commands to retrieve memory information: dumpsys meminfo for a specific package or /proc/meminfo for system-wide memory stats.
@mcp.tool() def get_memory_info(package_name: str | None = None, device_serial: str | None = None) -> str: """Get memory usage information""" if package_name: return run_adb(["shell", "dumpsys", "meminfo", package_name], device_serial) return run_adb(["shell", "cat", "/proc/meminfo"], device_serial) - src/adb_mcp_server/server.py:774-774 (registration)The @mcp.tool() decorator on the get_memory_info function registers it as an MCP tool.
@mcp.tool()