Skip to main content
Glama
JNISleuth-MCP

JNISleuth-MCP

by nighthawkk

resolve_apk_jni_map

Extracts native declarations from DEX files and maps each JNI method to its exact ELF offset in lib/*.so, linking Java calls to native code for APK analysis.

Instructions

Extracts all native declarations from DEX and maps them to exact ELF file offsets in lib/*.so.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "apk_path": "<apk_path>"
    },
    "name": "resolve_apk_jni_map"
  }
}

Input Schema

NameRequiredDescriptionDefault
archNo
apk_pathYes
dynamic_trace_pathNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

C2.7/5.0
Behavior2/5

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

No annotations are supplied, so the description carries the full behavioral burden, yet it only states the transformation. It says nothing about whether the tool requires a valid APK, what happens with multiple architectures or missing `lib/*.so` entries, whether it performs any dynamic analysis, or how results are returned. Coverage is adequate only at the level of 'what it computes', not 'how it behaves'.

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?

A single front-loaded sentence with no filler and no redundancy. It is efficient, though the brevity reflects under-specification rather than disciplined editing.

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

Completeness2/5

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

This is a cross-format DEX/ELF resolution tool with three undocumented parameters, no annotations, and no output schema. One sentence covering only the core transformation leaves an agent without enough information to call it correctly or interpret results, so the definition is incomplete relative to the tool's complexity.

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?

Schema description coverage is 0% across three parameters, and the description never mentions them. `arch` and `dynamic_trace_path` in particular are unexplained — the latter strongly implies optional correlation with a dynamic trace (cf. import_dynamic_trace, trace_jni_upcalls), but the description gives no hint of that relationship or of accepted formats. Only the implicit notion that an APK path is the input is conveyed.

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 pair ('Extracts ... maps') and concrete resources: `native` declarations from DEX into exact ELF file offsets in `lib/*.so`. This is far more specific than a name restatement and lets an agent distinguish it from list-only siblings like list_jni_methods. It stops short of explicitly contrasting with close siblings such as trace_jni_upcalls or get_cross_boundary_slice.

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?

No when-to-use guidance, no prerequisites, and no mention of when an agent should prefer this over trace_jni_upcalls, list_jni_methods, or get_cross_boundary_callgraph. The agent must infer the routing decision entirely from the sibling names.

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