Skip to main content
Glama
JNISleuth-MCP

JNISleuth-MCP

by nighthawkk

trace_jni_upcalls

Lists Java reflection callbacks (FindClass, GetMethodID, CallObjectMethod, SetByteArrayRegion) invoked inside a native ARM64 function to map JNI upcalls from a .so offset.

Instructions

Lists every Java reflection callback (FindClass, GetMethodID, CallObjectMethod, SetByteArrayRegion) invoked inside a native ARM64 function.

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": {
      "so_name": "<so_name>",
      "fn_offset": "<fn_offset>"
    },
    "name": "trace_jni_upcalls"
  }
}

Input Schema

NameRequiredDescriptionDefault
so_nameYes
apk_pathNo
fn_offsetYes

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. It implies a read-only listing, but it does not state whether the target .so must be pre-analyzed, whether apk_path is optional and why, what happens when the function or offset is not found, or what the result set looks like. The single sentence names the categories collected but discloses almost nothing about invocation behavior.

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?

It is a single front-loaded sentence with no filler, and the example symbol list is efficient. The parenthetical enumeration is dense but earns its place by making the output concrete; only the missing routing information counts against it, not verbosity.

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 three-parameter tool with no annotations, no output schema, and zero schema description coverage, so the description should shoulder the load. It explains the concept but omits parameter meaning, required setup, and any sense of the returned data, leaving the agent under-equipped to call it correctly or interpret results.

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%, so the schema documents none of the three parameters, and the description does not compensate. Only the phrase "native ARM64 function" hints that fn_offset identifies a function inside the .so, but nothing explains the offset's format/base, what so_name expects, or why apk_path is optional while the other two are required.

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?

The description uses a specific verb ("Lists") plus a well-scoped resource (Java reflection callbacks / JNI upcalls invoked inside a native ARM64 function) and gives concrete API examples (FindClass, GetMethodID, CallObjectMethod, SetByteArrayRegion). That is far more informative than the name alone. It loses a point because it never distinguishes itself from the very similarly named sibling trace_jni_callbacks 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?

There is no explicit when-to-use guidance, no prerequisites (e.g., whether an APK must be loaded or a Ghidra/IDA session synced), and no statement of when NOT to use it or which sibling to pick instead. With trace_jni_callbacks and get_cross_boundary_slice present, the agent is left to guess which tool answers its question.

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