Skip to main content
Glama
JNISleuth-MCP

JNISleuth-MCP

by nighthawkk

resolve_ollvm_indirect_branches

Resolves OLLVM CSEL + BR X8 state-machine dispatchers and .rodata jump tables in JNI_OnLoad, with optional ELF binary patching.

Instructions

Resolves OLLVM CSEL + BR X8 state-machine dispatchers and .rodata jump tables in JNI_OnLoad, optionally patching the ELF binary.

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>"
    },
    "name": "resolve_ollvm_indirect_branches"
  }
}

Input Schema

NameRequiredDescriptionDefault
so_nameYes
apk_pathNo
fn_offsetNo
patch_output_pathNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

C2.9/5.0
Behavior2/5

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

With no annotations, the description carries the full burden of behavioral disclosure. It mentions optional ELF patching, which signals mutation, but does not state what gets patched, whether the original binary is modified, what permissions or prerequisites are needed, or how failures are handled.

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 front-loaded sentence that states the purpose, technical scope, and optional side effect without filler. It is dense but appropriate for a specialized reverse-engineering tool.

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?

For a complex binary-patching tool with no annotations, no output schema, and 0% schema description coverage, the description is too sparse. It omits parameter semantics, return behavior, prerequisites, and the consequences of patching, leaving critical gaps for an agent to infer.

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

Parameters1/5

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

Schema description coverage is 0% across four parameters, and the description provides no mapping or meaning for so_name, apk_path, fn_offset, or patch_output_path. The brief mention of patching the ELF binary does not adequately explain the optional patch_output_path or the distinction between so_name and apk_path.

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, 'Resolves', and names concrete resources: OLLVM CSEL/BR X8 state-machine dispatchers and .rodata jump tables in JNI_OnLoad. It is clearly distinguishable from sibling JNI/APK analysis tools by its OLLVM-specific focus, though it does not explicitly name alternatives.

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?

The phrase 'in JNI_OnLoad' and 'optionally patching the ELF binary' imply the context in which the tool is useful, but there is no explicit when-to-use guidance, no exclusions, and no mention of sibling tools for related tasks. Usage is inferable but not guided.

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