Skip to main content
Glama

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

TableJSON Schema
NameRequiredDescriptionDefault
package_nameNo
device_serialNo

Implementation Reference

  • 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)
  • The @mcp.tool() decorator on the get_memory_info function registers it as an MCP tool.
    @mcp.tool()

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/rahulkr/r_adb_mcp_server'

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