Skip to main content
Glama

Inspect Android Method

inspect_android_method
Idempotent

Decompile one Android method from a local APK with smali fallback; use overload_index for duplicate names and see fallback or truncation markers.

Instructions

Decompile one Android method with smali fallback. Requires explicit overload_index when multiple methods share a name. Reports representation, fallback markers and source truncation; never treats display signatures as exact DEX identities.

Example tool call

This call uses example arguments supplied in the tool’s input schema.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "path": "/tmp/Example.apk",
      "class_name": "example.MainActivity",
      "method_name": "onCreate"
    },
    "name": "inspect_android_method"
  }
}

Input Schema

NameRequiredDescriptionDefault
pathYesLocal APK path; the target is never executed
class_nameYesExact fully qualified class name
method_nameYes
overload_indexNoExplicit index among same-name methods; required when ambiguous

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A3.7/5.0
Behavior4/5

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

Adds real behavior beyond annotations: smali fallback when decompilation fails, reporting of representation type, fallback markers and source truncation, plus a warning not to treat display signatures as exact DEX identities. It does not explain why readOnlyHint=false (e.g., on-disk decompilation/caching), leaving the write side effect of this otherwise-read operation undisclosed. No contradiction with the annotations, which never claim read-only.

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?

Three dense, front-loaded sentences with no filler; the core action and fallback come first. The third sentence is jargon-heavy ('display signatures as exact DEX identities') but still carries actionable meaning.

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?

With no output schema, the description does the work of describing returns: representation, fallback markers, and truncation. That is enough to call and interpret results, though the missing explanation of the non-read-only annotation and any output shape detail leaves small gaps.

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?

Schema coverage is 75% and the overload_index condition is already described in the schema, so the description mostly restates it. It adds no format or semantics for method_name (e.g., constructor or synthetic method naming) and nothing on path handling beyond what the schema says.

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

Purpose4/5

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

States a specific verb (decompile) and a precisely scoped resource (one Android method), which naturally separates it from class/package-level siblings like inspect_android_class. It does not name any sibling explicitly, so differentiation is inferred from scope rather than stated.

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

Usage Guidelines3/5

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

Gives one concrete usage rule: supply overload_index when multiple methods share a name. It offers no guidance on when to prefer this tool over a class-level or reference-tracing inspection, and no prerequisites about the APK being pre-decompiled or cached.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Deploy Server

Other Tools