Skip to main content
Glama
zifanersuotang

Codex Android MCP

Android meminfo

android_meminfo
Read-onlyIdempotent

Read app's PSS and breakdown to detect memory leaks; app must be running.

Instructions

Read an app’s memory usage (dumpsys meminfo <package>): TOTAL PSS in kilobytes plus the App Summary breakdown (Java heap, native heap, code, stack, graphics) and the largest mapping categories. PSS is the number to watch across repeated calls — a steadily climbing TOTAL PSS while the app sits idle is the Android shape of a leak. The app must be RUNNING; when it is not, the tool says so instead of reporting zero.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
deviceNoTarget adb serial. Defaults to the streamed device, else the only online one.
package_nameYesAndroid package to measure, e.g. "com.example.app".
Behavior4/5

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

Beyond the annotations (readOnlyHint, idempotentHint, etc.), the description adds valuable behavioral details: it states the app must be running, otherwise the tool says so instead of returning zero, and it explains how to interpret PSS for leak detection. This adds context not present in annotations.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is two sentences and front-loads the core function. The second sentence is somewhat long but packs useful interpretation and the running requirement without redundancy. Every sentence contributes value.

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

Completeness4/5

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

For a read-only metric tool with no output schema, the description adequately covers what the result means, how to interpret it, and a critical precondition. It does not enumerate every output field, but that is not required for correct invocation.

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?

The input schema already covers both parameters (`device` and `package_name`) with descriptions. The tool description does not add extra parameter-level meaning beyond what the schema provides, which is acceptable given 100% schema coverage.

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

Purpose5/5

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

The description states a clear verb ('Read'), a specific resource (`dumpsys meminfo <package>`), and explicitly names the key output metric (TOTAL PSS) and the breakdown categories. It is clearly distinct from sibling tools like android_processes or android_app_info, avoiding ambiguity.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides concrete guidance on when to use the tool (for detecting memory leaks by watching TOTAL PSS trend) and a key prerequisite (the app must be running). It does not explicitly name alternative tools, but the context of memory leak analysis makes its intended use clear.

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/zifanersuotang/codex-android-mcp'

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