Skip to main content
Glama
rahulkr
by rahulkr

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

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

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()
Behavior2/5

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

No annotations are provided, so the description carries the full burden of behavioral disclosure. 'Get memory usage information' implies a read-only operation, but it doesn't specify permissions required, rate limits, whether it's real-time or cached data, or what the output format looks like. This is a significant gap for a tool with no annotation coverage.

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 no wasted words, making it easy to parse quickly. It's appropriately sized for a simple tool, though this conciseness comes at the cost of detail in other dimensions.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the tool's low complexity (2 optional parameters) and the presence of an output schema (which handles return values), the description is minimally adequate. However, with no annotations and low schema coverage, it lacks crucial details like parameter semantics and behavioral context, making it incomplete for optimal agent use.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters2/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The input schema has 2 parameters with 0% description coverage (only titles 'Package Name' and 'Device Serial'), and the description adds no information about these parameters. It doesn't explain what 'package_name' or 'device_serial' mean, their optional nature, or how they affect the memory info retrieved, failing to compensate for the low schema coverage.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose3/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description 'Get memory usage information' clearly states the verb ('Get') and resource ('memory usage information'), making the purpose understandable. However, it doesn't specify what type of memory (device memory, app memory, etc.) or distinguish it from sibling tools like get_cpu_info or get_device_info, leaving some ambiguity about scope.

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 whether it's for system-wide memory, app-specific memory, or how it differs from other info-gathering tools in the sibling list, such as get_cpu_info or get_battery_stats, leaving the agent to guess based on 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/rahulkr/r_adb_mcp_server'

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