MCP ScannerCustom audit
All servers

xjoker/delamain

Headless MCP server that gives AI agents the full power of JADX for Android (APK/DEX/AAB) reverse engineering.

Packagedelamain
Version20260724.4 in pom.xml
Publisherxjoker community
MCP Registrynot listed
Scanned2026-11-25
Scannerv1.3.0
Methodologyv1.2
Stars 9Forks 2Last push 2026-11-02
Java 61.8%Python 35.6%Rust 2.6%by source files the scanner reads
Code safetypartly tracedExposure8.9Prompts8.5Supply chain2.8Secrets10.0Transparency10.0
Analysis confidence91%
How much of the server the scanner could read: tools analyzed, files parsed, limits hit.
Code Safetypartly traced—

Paths from tool input into commands, SQL, files and URLs

Capability Exposure8.9/10Good

How much power the tools give an agent over the machine

Prompt Integrity8.5/10Good

Hidden instructions and poisoning in text for the model

Supply Chain2.8/10Poor

Known vulnerabilities in the packages the server uses

Secrets & Credentialsnothing published yet10.0/10

How the server reads credentials and where they can go

Behavior Transparencynothing published yet10.0/10

Whether the tools do only what their descriptions say

How far the analysis went

The scanner traces each tool from its input to the operations its code performs, and here it could not follow every path. Code Safety is shown as partly traced instead of a score: no finding there is not a clean result. The score of Capability Exposure counts only what it could follow.

  • In 75 places a tool's input is handed to a function whose name matches several definitions in the code; the scanner could not tell which one runs, so it stopped there

Top risks in plain words

  • CRITICAL12 production dependencies have known vulnerabilities (worst: critical).

How to use it safely

Practical steps from what we found in this server. They lower the risk; they do not replace a review of the code.

  • Give it a narrowly scoped token

    Its code reads credentials or environment variables. Use a key limited to what this server needs, not your main one.

  • Update its vulnerable packages

    Use authlib 1.9.1 or later, certifi 2026.10.18 or later, dnspython 2.9.2 or later, fastmcp 3.4.10 or later and 7 more.

  • Keep confirmations on

    Leave your MCP client's confirmation prompt on for tools that change files, run commands or send data.

What its tools can do on your machine

The server offers 88 tools. When an AI agent calls them, this is what their code can do on the machine where the server runs, as traced in the source. Tools that call code the scanner could not follow may do more.

Connect to the internet or other hostssend requests or open connections
analyze_apk_tool, apply_proguard_mapping_tool, batch_get_method_by_name, create_transfer_token, export_rename_mappings_tool, generate_apk_digest and 17 more
23 of 88
Read environment variablesoften where API keys are kept
create_transfer_token
1 of 88

No tool was seen to: start other programs on the machine; read or write files; read passwords, tokens or keys; touch sensitive locations.

Where its requests and secrets go

Read from the names along each tool's calls, not from a run: what the code says, not every address it may reach at run time.

Hosts written in the code

The literal addresses the tools' requests name.

  • None: no request names a fixed host.
Addresses from settings

Constants or settings that start an address; the value comes from configuration.

  • None seen.
Secrets it reads

Credential-like environment variables. Give the server a key with the least access it needs.

  • None: no credential-like variable is read by the tools.

Text it brings in from outside

No tool was seen returning text from outside the server to the model.

Tool annotations

No tool declares MCP annotations (readOnlyHint, destructiveHint and the rest). Clients use them to decide what to confirm; directories such as Anthropic's and OpenAI's ask for them.

Tools, prompts and resources (88: 88 tools)

Open a row for its full description. Chips show what its code can reach, and which risky capability its own description declares.

add_annotationtool Add a persistent text annotation to a class/method/field (stored in local SQLite).
Add a persistent text annotation to a class/method/field (stored in local SQLite).

        Args:
            target_type: class|method|field. target_name: Fully qualified name. content: Annotation text.
            author: Author name. apk_hash: Leave empty to use currently open APK. instance_id: Target JADX instance.
        Returns:
            dict: {success, id, target_type, target_name, apk_hash}
add_bookmarktool Create a labeled bookmark for an important code location (stored in local SQLite).
Create a labeled bookmark for an important code location (stored in local SQLite).

        Args:
            target_type: class|method|field. target_name: Fully qualified name. label: e.g. "crypto logic".
            note: Optional description. author: Author name. apk_hash: APK hash. instance_id: Target JADX instance.
        Returns:
            dict: {success, id, label, target_type, target_name, apk_hash}
add_tagtool Add a classification tag to a code element (stored in local SQLite).
Add a classification tag to a code element (stored in local SQLite).

        Args:
            target_type: class|method|field. target_name: Fully qualified name. tag: e.g. "crypto", "network".
            author: Author name. apk_hash: APK hash. instance_id: Target JADX instance name.
        Returns:
            dict: {success, id, tag, target_type, target_name, apk_hash}
analyze_apk_tooltool Load an APK/JAR into the JADX backend with smart routing.Network
Load an APK/JAR into the JADX backend with smart routing.

        strategy="auto" (default): load if the backend is free; return "ambiguous"
          when it already has a file loaded (human guidance needed).
        strategy="replace": load, replacing whatever is currently open.
        strategy="new_instance": no-op in this single-backend gateway — returns
          all_busy pointing at replace/append instead.
        strategy="append": append to current project (useful for dep JARs).

        Args:
            path: Sandbox-relative file path (e.g. "target.apk"). strategy: auto|replace|new_instance|append.
            instance_id: Unused — this gateway has a single fixed JADX backend.
        Returns:
            dict: {status: loaded|ambiguous|all_busy|error, instance, path, ready: false,
                   poll_with, next_steps}
apply_proguard_mapping_tooltool Apply a ProGuard/R8 mapping.txt to batch-rename all obfuscated classes at once.Network
Apply a ProGuard/R8 mapping.txt to batch-rename all obfuscated classes at once.

        Args:
            mapping_content: Complete contents of a ProGuard/R8 mapping.txt file.
            instance_id: Target JADX instance name.
        Returns:
            dict: {applied: int, failed: int, errors: [str], total: int, format: str}
batch_get_class_sourcetool Fetch 2-20 class sources in one request with auto size-management. Use get_class_source for a single class.
Fetch 2-20 class sources in one request with auto size-management. Use get_class_source for a single class.

        Each page returns whole, ready-to-use class objects (never a JSON fragment to reassemble).
        When a batch's total size exceeds the inline byte budget, the response comes back paginated
        by whole classes: has_more=true plus next_offset. Call again with offset=next_offset to fetch
        the remaining classes — no parsing or concatenation needed on your side.

        Args:
            class_names: List of fully qualified class names (max 20, same list every call).
            offset: Index into class_names to resume from (0=first page; use next_offset from a
            prior response to continue). force: Bypass the pre-flight size guard. instance_id:
            Target JADX instance name.
        Returns:
            dict: {classes: [{name, found, content|error}], total, returned, offset, found,
            has_more, next_offset?} or BATCH_TOO_LARGE error with suggestions. _ai_instruction is
            set when has_more=true, telling you the next offset to call.
batch_get_method_by_nametool Fetch multiple method sources in one request using "class:method" format. Auto size-managed.Network
Fetch multiple method sources in one request using "class:method" format. Auto size-managed.

        Args:
            methods: List of "class_name:method_name" strings (~16 per call; more trips
                BATCH_TOO_LARGE — either paginate with chunk or pass force=True). chunk: 0=first, N=continue.
            force: Bypass size guard. instance_id: Target JADX instance name.
        Returns:
            dict: {methods: [{class_name, method_name, code, found}]} or BATCH_TOO_LARGE error.
batch_get_xrefstool Fetch xrefs for multiple targets in one request (max 10). Format: "type:class[:member]".
Fetch xrefs for multiple targets in one request (max 10). Format: "type:class[:member]".

        Args:
            targets: e.g. ["class:com.example.Foo", "method:com.example.Bar:myMethod"]. Max 10.
            instance_id: Target JADX instance name.
        Returns:
            dict: {results: [{target, found, xrefs_count, xrefs: [{class, raw_class, method,
                raw_method, from_method, raw_from_method, source_line[, decompiled_line,
                code_snippet]}], distinct_referrer_class_count, resolution, via}
                | {target, found: false, error}], total: int}. No pagination — always full lists.

                Same resolution/via/distinct_referrer_class_count semantics as get_xrefs (see its
                docstring) — always precise/per-call-site granularity, never the class-level dedup
                get_xrefs(include_snippet=False) uses, so xrefs_count and distinct_referrer_class_count
                can legitimately differ; both are correct.

                Same 25s live-decompile deadline as get_xrefs: a cut-short scan sets partial_results=true
                and partial_reason on the response — follow its suggestion (warmup, fewer targets, or
                submit_xref) rather than assuming the target has no more referrers.
create_transfer_tokentool Create a one-time upload token so the user can PUT an APK/JAR/AAR/DEX fileNetworkEnv vars
Create a one-time upload token so the user can PUT an APK/JAR/AAR/DEX file
        directly to the JADX sandbox, out of the AI context (bytes never pass through
        this conversation).

        upload_url always points at **this gateway's own address** (default port 8651,
        which proxies PUT /transfer/upload and GET /transfer/status through to the Java
        backend on localhost:8650) — never at the Java backend directly, since it is
        not reachable from outside the fused container. The host is resolved in
        priority order: the JADX_TRANSFER_PUBLIC_URL env var > [server]
        transfer_public_url in the gateway TOML > this gateway process's own bind
        host:port. Set JADX_TRANSFER_PUBLIC_URL (or the TOML equivalent) when the
        gateway's bind address (e.g. 0.0.0.0) is not itself a reachable hostname/IP
        from the machine that will run the upload.

        Workflow:
          1. Call this tool with the destination filename (and size_bytes if known, for
             an upfront cap check).
          2. Tell the user to run: `delamain-cli --upload-url <upload_url> --token <token> <local-file>`
          3. Once the upload responds with {"status": "complete", "path": ...}, call
             load_file(path=<filename>) to load it into JADX.
             (Resume-on-stall mechanics and the raw curl equivalent: get_jadx_guide(verbose=True).)

        Args:
            filename: Destination file name — a plain basename, no path separators.
            size_bytes: Optional total size in bytes, used for an upfront cap check
                (rejected with an error if it exceeds the server's configured max).
            instance_id: Target JADX instance.
        Returns:
            dict: {token, filename, upload_path, status_path, expires_at_epoch_ms,
                   max_bytes, chunk_size_hint, upload_url} on success — or
                   {..., upload_url_hint} instead of upload_url when no
                   externally-reachable address is configured for this instance.
decompile_with_modetool Re-decompile a single class in an explicit mode — a temporary, non-persistent fallback view.
Re-decompile a single class in an explicit mode — a temporary, non-persistent fallback view.

        Use this when the normal (RESTRUCTURE) output from get_class_source is garbled, partial, or
        fails to decompile cleanly (check decompile-diag first) — retry it here in SIMPLE or FALLBACK
        mode to get a usable, if less readable, view instead. This applies to ONE class only, and the
        result is NOT cached and NOT persisted: get_class_source keeps returning the normal
        RESTRUCTURE output for this class afterward — call this again each time you need the
        alternate-mode view.

        Args:
            class_name: Fully qualified class name.
            mode: RESTRUCTURE|SIMPLE|FALLBACK (default FALLBACK — skips the restructuring pipeline
                that most often produces garbled output on obfuscated/complex control flow).
            comments_level: Optional JADX CommentsLevel name, applied only for this call.
            chunk: Pagination for large responses (0 = first chunk), same semantics as get_class_source.
            instance_id: Target JADX instance name.
        Returns:
            dict: {response, mode, class_name, raw_class, ephemeral: true, note}
delete_annotationtool Delete an annotation by its numeric ID (from get_annotations).
Delete an annotation by its numeric ID (from get_annotations).

        Args:
            annotation_id: Numeric annotation ID. instance_id: Target JADX instance name.
        Returns:
            dict: {success, deleted_id}
delete_bookmarktool Delete a bookmark by its numeric ID (from list_bookmarks).
Delete a bookmark by its numeric ID (from list_bookmarks).

        Args:
            bookmark_id: Numeric bookmark ID. instance_id: Target JADX instance name.
        Returns:
            dict: {success, deleted_id}
delete_tagtool Delete a tag by its numeric ID (from get_tags).
Delete a tag by its numeric ID (from get_tags).

        Args:
            tag_id: Numeric tag ID. instance_id: Target JADX instance name.
        Returns:
            dict: {success, deleted_id}
export_analysis_reporttool Export annotations, bookmarks, and tags as a formatted report.
Export annotations, bookmarks, and tags as a formatted report.

        Args:
            format: markdown|json|sarif. include_annotations/bookmarks/tags: Toggle sections.
            instance_id: Target JADX instance name.
        Returns:
            dict: {format, report: str, stats: {annotations, bookmarks, tags}, generated_at}
export_callgraphtool Export the call graph for a method as structured JSON or Graphviz DOT.
Export the call graph for a method as structured JSON or Graphviz DOT.

        Use this instead of assembling a call graph by hand from repeated get_xrefs /
        method-callees calls — it returns the full multi-method neighborhood in one call.

        Depth is capped at 6 client-side. For deep call chains, start with depth=2
        and increase incrementally.

        Args:
            class_name: Fully qualified class name (e.g. "com.example.LoginActivity").
            method_name: Method name to root the graph at (e.g. "onCreate").
            depth: Traversal depth 1-6 (default 3). Values above 6 are clamped to 6.
            format: "json" (default, nodes+edges dict) or "dot" (Graphviz DOT language string).
            instance_id: Target JADX instance name.
        Returns:
            When format=json: {format, root, depth, nodes:[{id,class,method}], edges:[{from,to}], truncated}
            When format=dot:  {format, dot:"digraph { ... }"}
export_rename_mappings_tooltool Export all rename mappings (classes, methods, fields) from the current JADX session.Network
Export all rename mappings (classes, methods, fields) from the current JADX session.

        Args:
            instance_id: Target JADX instance name.
        Returns:
            dict: {mappings: [{type, original_name, new_name, class_context}], total: int}
find_callers_chaintool Trace backward "who can reach this" call chains.
Trace backward "who can reach this" call chains.

        Two granularities:
        - granularity='class' (default, FAST): instant N-hop BFS over the precomputed usage
          graph — "which classes can reach target_class", returned as per-depth layers. No
          decompilation; scales to thousands of nodes in tens of ms. target_method is ignored.
          Use this first for a broad reachability overview on large APKs.
        - granularity='method' (detailed): per-method caller tree with input-source flagging
          (user input / network / storage). Requires target_method. Heavier (per-hop xref) but
          each hop is fast now; keep max_depth small.

        Args:
            target_class: Fully qualified class name.
            target_method: Method name (required only for granularity='method').
            max_depth: BFS depth 1-12 for class, 1-5 for method (default 3).
            granularity: 'class' | 'method'.
            max_nodes: class-mode safety cap on discovered classes (default 2000).
            instance_id: Target JADX instance name.
        Returns:
            class: {target, layers:[{depth,count,classes}], total_callers, truncated, via}
            method: {caller_tree, sources_found, stats}
generate_apk_digesttool Generate a pre-analysis digest: file info, manifest, SDK detection, obfuscation assessment, entry points.Network
Generate a pre-analysis digest: file info, manifest, SDK detection, obfuscation assessment, entry points.

        For APK/AAR/DEX files, also includes enhanced metadata when available:
        - signing_certificates: [{subject, sha256, algorithm, valid_from, valid_until}]
        - native_libraries: [{path, abi, name}]
        - dex_count: int

        Args:
            instance_id: Target JADX instance name.
        Returns:
            dict: {file_type, package_name, class_stats, detected_sdks, obfuscation_level,
                   analysis_tips, signing_certificates (APK only), native_libraries (APK only)}
generate_frida_enumtool Generate a Frida script to enumerate class instances, static fields, and enum constants at runtime.
Generate a Frida script to enumerate class instances, static fields, and enum constants at runtime.

        Args:
            class_name: Fully qualified class name. instance_id: Target JADX instance name.
        Returns:
            dict: {script: str, class_name}
generate_frida_hooktool Generate a ready-to-run Frida hook script with overload support. Omit method_name to use all_methods.
Generate a ready-to-run Frida hook script with overload support. Omit method_name to use all_methods.

        Args:
            class_name: Fully qualified class name. method_name: Method name (optional).
            hook_type: method_enter|method_exit|both|constructor|all_methods (default: both).
            instance_id: Target JADX instance name.
        Returns:
            dict: {script: str, class_name, method_name, hook_type}
generate_frida_tracetool Generate a Frida tracing script that logs all method calls on a class with args and return values.
Generate a Frida tracing script that logs all method calls on a class with args and return values.

        Args:
            class_name: Fully qualified class name. include_subclasses: Also trace direct subclasses.
            instance_id: Target JADX instance name.
        Returns:
            dict: {script: str, class_name, include_subclasses}
get_all_classestool List all classes in the project with pagination support.
List all classes in the project with pagination support.

        Args:
            offset: Pagination start index. count: Max results (0=all).
            instance_id: Target JADX instance name.
        Returns:
            dict: {classes: [str, ...], total: int}
get_all_resource_file_namestool List all resource file paths (layouts, drawables, etc.) with pagination.
List all resource file paths (layouts, drawables, etc.) with pagination.

        Args:
            offset: Pagination start. count: Max results (0=all). instance_id: Target JADX instance name.
        Returns:
            dict: {files: [str, ...], total: int, has_more: bool}
get_analysis_summarytool Get all annotations + bookmarks + tags for the current APK in one call. Use to restore analysis context.
Get all annotations + bookmarks + tags for the current APK in one call. Use to restore analysis context.

        Args:
            apk_hash: APK hash (leave empty for currently open APK). instance_id: Target JADX instance name.
        Returns:
            dict: {apk_hash, annotations, bookmarks, tags, annotations_count, bookmarks_count, tags_count}
get_android_manifesttool Retrieve AndroidManifest.xml content. Auto-chunked if >8KB.
Retrieve AndroidManifest.xml content. Auto-chunked if >8KB.

        Args:
            chunk: 0=first, N=continue chunked response. instance_id: Target JADX instance name.
        Returns:
            dict: {content: str, _chunking: {...}} — call again with chunk=N if has_more=true.
get_annotationstool Query annotations for the current APK with optional filters.
Query annotations for the current APK with optional filters.

        Args:
            target_type: Filter by type. target_name: Filter by name. apk_hash: Filter by APK hash.
            instance_id: Target JADX instance name.
        Returns:
            dict: {annotations: [...], count}
get_attack_surfacetool Analyze the Android attack surface: exported components, deep-links, and dangerous permissions.
Analyze the Android attack surface: exported components, deep-links, and dangerous permissions.

        This is the recommended first tool for security-focused analysis.
        No warmup required — results are derived from the manifest and metadata.

        Args:
            instance_id: Target JADX instance name.
        Returns:
            dict: {
                activities, services, receivers, providers (exported),
                custom_permissions, dangerous_permissions_used,
                deeplink_summary: [{scheme, host, path}],
                total_exported: int, summary: str
            }
get_class_infotool Get structured class metadata: inheritance, interfaces, method/field names, native methods.
Get structured class metadata: inheritance, interfaces, method/field names, native methods.

        Args:
            class_name: Fully qualified class name. instance_id: Target JADX instance name.
        Returns:
            dict: {class_name, package, super_class, interfaces, method_names, field_names, native_count}
get_class_sourcetool Fetch decompiled Java source of a class. Large classes are auto-chunked (>8KB).
Fetch decompiled Java source of a class. Large classes are auto-chunked (>8KB).

        The first chunk (chunk=0) may carry a decompile_quality flag: "ok" (normal),
        "degraded" (JADX fell back to a simpler decompile mode — output may be structurally
        incomplete), "failed" (JADX recorded a hard per-class error or never finished
        processing — treat this source as unreliable), or "unknown" (no quality verdict cached
        for this class yet, e.g. a disk-restored/cold-cache entry — not a signal either way).
        When degraded/failed, a "hint" field is included with the recommended next step. On
        degraded/failed, fall back to get_smali_of_class for the raw bytecode, call
        get_decompile_diag for the full structured diagnostic, or retry via decompile_with_mode.
        decompile_quality/hint are only attached on chunk=0, not on continuation chunks.

        If response is an empty string, chunk=0 also carries source_status explaining why:
        "inner_class_inlined" (source is merged into the outer class — call get_class_source on
        that instead), "decompile_failed" (see decompile_quality/hint), "not_in_static_dex"
        (dynamically generated/native-bridge class — Java source will never exist), or
        "unknown_empty" (no confident cause). An _ai_instruction field carries the matching
        next-action for the first three.

        Once referrer_count exceeds 5, an _ai_instruction suggests find_callers_chain or
        export_callgraph instead of manually walking get_class_source per referrer.

        Args:
            class_name: Fully qualified class name. chunk: 0=first, N=continue chunked response.
            instance_id: Target JADX instance name.
        Returns:
            dict: {response: str, _chunking: {...}, decompile_quality?: str, hint?: str,
            source_status?: str, referrer_count?: int, _ai_instruction?: str} — call again with
            chunk=N if has_more=true.
get_code_metadatatool Get precise symbol reference metadata for a class: which class/method/field is
Get precise symbol reference metadata for a class: which class/method/field is
        referenced at every source position. This is the basis for "go to definition" / "what
        symbol is here" navigation, and for locating exactly where a class is referenced by
        another class (pair with get_class_source to know the surrounding code).

        Without position: returns the reference list for the whole class (capped by max).
        With position: resolves the single symbol at that char-offset (exact match, else the
        enclosing node, else the nearest node before it).

        Names follow the raw/alias dual-track: raw_name is the original/runtime name (use for
        Frida hooks), alias_name is the deobfuscated display name.

        Args:
            class_name: Fully qualified class name. position: Char-offset to resolve a single
            symbol at. max: Cap on the reference list size (default 300, ignored when position
            is set). instance_id: Target JADX instance name.
        Returns:
            dict: {has_metadata, reference_count, references: [{kind, raw_name, alias_name,
            position, line, ...}], truncated} or {has_metadata: false, hint} if not yet
            decompiled. With position: {at: {kind, raw_name, alias_name, resolved_by, ...}}.
get_code_search_resulttool Poll the result of a code search submitted via submit_code_search().Network
Poll the result of a code search submitted via submit_code_search().

        Args:
            ticket: Ticket ID from submit_code_search(). offset: Pagination start. count: Max results.
            instance_id: Target JADX instance name.
        Returns:
            dict: status="running" (poll again) | status="done" + classes list | status="timed_out"|"cancelled"|"not_found"
get_config_stringstool Get config strings: APK=strings.xml info, JAR=.properties files with search/get.
Get config strings: APK=strings.xml info, JAR=.properties files with search/get.

        Args:
            mode: summary|search|get|all. query: Search keyword. key: Property key.
            file: Filter by .properties filename (JAR only). instance_id: Target JADX instance name.
        Returns:
            dict: {source_type: android_strings|java_properties, ...}
get_decoded_resourcetool Fetch the decoded text content of a resource file (e.g. binary XML layouts decoded
Fetch the decoded text content of a resource file (e.g. binary XML layouts decoded
        to readable XML). Auto-chunked if >8KB. Use list_resources_by_type to discover file
        names first.

        Args:
            file_name: Resource path, e.g. "res/layout/activity_main.xml". chunk: 0=first,
            N=continue chunked response. instance_id: Target JADX instance name.
        Returns:
            dict: {content: str, file_name, resource_type, source, _chunking: {...}} — call
            again with chunk=N if has_more=true. 404-style {status: "not_found"} if undecodable.
get_decompile_diagtool Authoritative decompilation-health diagnostic for one class — call this whenever
Authoritative decompilation-health diagnostic for one class — call this whenever
        get_class_source's output looks suspicious (truncated, garbled, oddly short, or the
        response carries decompile_quality != "ok").

        Unlike a naive text scan, every signal here comes from JADX's own internal ClassNode
        state, so it cannot be fooled by ordinary comments that merely look like warnings.

        Returns:
            dict: {
              process_state: str, process_complete: bool,  # did decompilation actually finish
              decompile_mode_override: str|None, is_fallback_mode: bool,  # JADX force-downgraded to a simpler pass
              jadx_error_count: int, jadx_errors: [{message, cause}],  # hard per-class failures
              jadx_comment_count: int, jadx_comments_by_level: {...},  # internal JADX diagnostics
              source_available_for_scan: bool,
              source_warning_markers: {...},  # best-effort text markers; SUPPLEMENTARY ONLY —
                                                # never authoritative on their own; jadx_error_count /
                                                # is_fallback_mode / process_complete are ground truth
              alternative_views: {smali_endpoint, source_endpoint}
            }

        Next steps when this reports trouble:
            - jadx_error_count > 0 or process_complete == false → decompilation genuinely failed;
              call get_smali_of_class for the raw Dalvik bytecode instead.
            - is_fallback_mode == true → readable but possibly structurally incomplete; cross-check
              against get_smali_of_class, or call decompile_with_mode to retry in another mode.

        Args:
            class_name: Fully qualified class name. instance_id: Target JADX instance name.
get_decompile_priority_listtool Rank uncached classes by importance: Android components > app package > obfuscated > SDKs.
Rank uncached classes by importance: Android components > app package > obfuscated > SDKs.

        Args:
            analysis_goal: Optional hint for logging (e.g. "find network APIs").
            package: App package prefix to boost own-package classes. instance_id: Target JADX instance.
        Returns:
            dict: {priority_list: [{class_name, priority, reason}], suggested_batch_size}
get_decompile_statustool Check live JADX runtime state: decompile progress, memory usage, and search lock.
Check live JADX runtime state: decompile progress, memory usage, and search lock.

        ALWAYS call this before resource-intensive operations (get_class_source, xrefs, code search).

        Decision rules:
        - memory.usage_percentage > 85% → reduce batch sizes to ≤5, skip get_smali_of_class
        - search_lock.locked = true → wait 5s and retry (another operation holds the write lock)

        Args:
            instance_id: Target JADX instance name.
        Returns:
            dict: {cached_percentage, memory.usage_percentage, search_lock.locked, status}
get_fields_of_classtool List all fields of a class with Frida-compatible type information (type_frida).
List all fields of a class with Frida-compatible type information (type_frida).

        Args:
            class_name: Fully qualified class name. instance_id: Target JADX instance name.
        Returns:
            dict: {fields: [{name, type, type_frida, is_static, is_final, modifiers}], count}
get_file_infotool Get file type, class count, and recommended tools for the loaded APK/JAR. Call first when starting analysis.
Get file type, class count, and recommended tools for the loaded APK/JAR. Call first when starting analysis.

        Args:
            instance_id: Target JADX instance name (use list_jadx_instances to find instance names).
        Returns:
            dict: {file_type, class_count, android_features, recommended_tools, apk_package, ...}
get_index_statstool Internal index health snapshot (name indices, shard index, trigram index, snapshot cache).
Internal index health snapshot (name indices, shard index, trigram index, snapshot cache).

        Use this to decide whether code-search (search_in='code') is available, or whether to
        stick to metadata (class/method/field name) searches.

        The primary signal is shard_index (mmap'd, sharded RoaringBitmap index):
          - shard_index.built == true and shard_index.covered_classes > 0 → code-search is
            viable. Coverage is decoupled from heap size — this works even on low-memory
            instances where the old heap-resident index never got there.
          - shard_index not yet built → prefer metadata searches until it finishes.
        trigram_index is now a residual/self-heal layer (library classes + rename recovery
        cache), not the coverage signal for code-search — its saturation_percent can stay low
        or even 0% on low-memory setups while shard_index is fully covered and code-search
        works normally.
        index_prebaked reports whether a pre-baked index volume was loaded at startup (see
        docs/prebaked-index.md); index_prebaked.complete/reason explain partial or missing loads.
        Even with full coverage, broad/common search terms return partial_results (see
        search_info.broad_term in code-search results) instead of exhaustively scanning.

        CODE SEARCH HARD LIMITS — never use search_in='code' for: hex strings ≥8 chars (AES
        keys, hashes, device IDs), UUID/random-looking alphanumeric tokens, base64 blobs, or
        long URL paths ("/api/v1/some/deep/path"). These either live in native libs (invisible
        to JADX) or in classes excluded from the shard index due to size — use search_in=
        'class'/'method' to find the owning class, then get_class_source() on it instead.

        xref_readiness decides how to call xref tools: xref_readiness.class_level == "ready"
        means class-level xref (who references class X) is instant. xref_readiness.
        precise_snippets != "ready" means the precise, snippet-level harvest is still building
        (or was skipped) — do NOT request include_snippet=true against a high-fanin class while
        it says "building"/"skipped", since that falls through to a live per-caller re-decompile
        and can be slow; prefer class-level xref first, or wait for precise_snippets == "ready".

        Args:
            instance_id: Target JADX instance; omit for default.
        Returns:
            dict: {name_indices: {class_name_buckets, method_name_buckets,
                                  field_name_buckets, raw_name_map_size, index_ready},
                   shard_index: {built, covered_classes, ...},
                   trigram_index: {enabled, indexed_classes, trigram_count, max_trigrams,
                                   max_class_size_bytes, estimated_memory_mb,
                                   saturation_percent},
                   index_prebaked: {complete, reason},
                   xref_readiness: {class_level: "ready"|"building",
                                     precise_snippets: "ready"|"building"|"skipped",
                                     live_fallback_cost: str (present when precise_snippets != "ready")},
                   snapshot_cache: {method_snapshot_classes, field_snapshot_classes},
                   code_cache: {class_index_size, delegates_to_jadx_icodecache}}
get_jadx_guidetool Bootstrap guide for JADX reverse-engineering workflows.
Bootstrap guide for JADX reverse-engineering workflows.

        Default call returns a short summary and key rules (~100 tokens).
        verbose=True returns the full workflow guide with all sections (~800 tokens).
        install_skills=True, target='claude' returns the skill file for the AI to write
        to ~/.claude/commands/jadx-workflow.md — the AI MUST get user authorization first.

        Call this at the start of a new reverse-engineering session to orient yourself.

        Args:
            verbose: Return full guide (default False = short summary only).
            install_skills: Return skill file payload to install locally.
            target: 'claude' | 'codex' — required when install_skills=True.
        Returns:
            dict: {guide} or {files_to_write, instruction} when install_skills=True.
get_main_activity_classtool Fetch the app entry-point Activity class as defined in AndroidManifest.xml.
Fetch the app entry-point Activity class as defined in AndroidManifest.xml.

        Args:
            chunk: 0=first, N=continue chunked response. instance_id: Target JADX instance name.
        Returns:
            dict: {content: str, _chunking: {...}} — call again with chunk=N if has_more=true.
get_memory_diagnosticstool Heap/RSS snapshot AFTER forcing a garbage collection — the honest memory figure.
Heap/RSS snapshot AFTER forcing a garbage collection — the honest memory figure.

        get_decompile_status().memory reports live heap usage, which includes garbage not yet
        collected and so overstates what delamain actually needs. Use this instead when the
        question is "how much memory does this APK really cost" (capacity planning, deciding a
        container size, or checking whether memory grew after a heavy operation).

        Reading the result:
          - heap.used_mb (with gc.ran == true) — the clean steady state: live objects only.
          - heap.freed_mb — how much of the earlier figure was collectable garbage.
          - heap.committed_mb vs process.rss_mb — what the JVM took from the OS vs what the host
            sees. The mmap'd shard index counts in RSS but never in the heap, so rss > committed
            is normal; rss far above committed with a small used_mb means the JVM is sitting on
            memory it no longer needs.
          - container.memory_limit_mb — the cgroup limit the startup heap sizing was derived from
            (null = the container has no limit set, so it can use the whole host).

        Args:
            gc: Collect before measuring (default true). Pass false for a pure observation —
                cheaper, but the number then includes uncollected garbage.
            instance_id: Target JADX instance; omit for default.
        Returns:
            dict: {gc: {ran, elapsed_ms},
                   heap: {max_mb, committed_mb, used_mb, usage_percentage,
                          used_before_gc_mb, freed_mb},   # last two only when gc ran
                   process: {rss_mb, virtual_mb},          # null off Linux
                   container: {memory_limit_mb},           # null when unlimited/unreadable
                   consumers: {trigram_count, trigram_indexed_classes, shard_index_built}}
get_method_by_nametool Fetch source code of a specific method. Use method_signature (JVM descriptor) to pick an overload.Network
Fetch source code of a specific method. Use method_signature (JVM descriptor) to pick an overload.

        Args:
            class_name: Fully qualified class name. method_name: Method name.
            method_signature: JVM short descriptor, e.g. 'process(Ljava/lang/String;I)Z' (optional).
            instance_id: Target JADX instance name.
        Returns:
            dict: {code: str} or {available_descriptors: [...]} if overloads exist.
get_method_calleestool Get methods called by the specified method (pattern-based callee analysis).Network
Get methods called by the specified method (pattern-based callee analysis).

        Args:
            class_name: Fully qualified class name. method_name: Method name.
            instance_id: Target JADX instance name.
        Returns:
            dict: {callees: [str, ...], callees_count: int}
get_method_signaturetool Get structured method signatures with Frida-compatible types and frida_overload strings.Network
Get structured method signatures with Frida-compatible types and frida_overload strings.

        Args:
            class_name: Fully qualified class name. method_name: Method name.
            instance_id: Target JADX instance name.
        Returns:
            dict: {signatures: [{return_type, parameters, frida_overload, ...}], overloads: int}
get_method_sourcetool Get decompiled source for a single method, including line numbers and import list.Network
Get decompiled source for a single method, including line numbers and import list.

        Preferred over get_class_source when you need one specific method — avoids loading
        the entire class (which can be thousands of lines for large APKs).

        Args:
            class_name: Fully qualified class name.
            method_name: Method name (deobfuscated or raw).
            method_signature: JVM short descriptor to disambiguate overloads, e.g.
                'process(Ljava/lang/String;I)Z' (optional). Required when multiple
                overloads exist.
            instance_id: Target JADX instance name.
        Returns:
            dict: {class_name, method_name, raw_method_name, frida_overload,
                   start_line, end_line, imports, source}
            On multiple overloads without method_signature: returns HTTP 300 with
            available_descriptors list (same behaviour as get_method_by_name).
            start_line/end_line are -1 when line info is unavailable (class not
            yet decompiled or JADX metadata missing).
get_methods_of_classtool List all methods of a class with Frida-friendly metadata (is_static, overload_count, etc.).
List all methods of a class with Frida-friendly metadata (is_static, overload_count, etc.).

        Args:
            class_name: Fully qualified class name. instance_id: Target JADX instance name.
        Returns:
            dict: {methods: [{name, is_static, is_native, overload_count, return_type, ...}], count}
get_native_surfacetool Aggregate a native/JNI reverse-engineering handoff worklist: every declared native
Aggregate a native/JNI reverse-engineering handoff worklist: every declared native
        method (with a JNI mangled-name candidate) plus every System.loadLibrary/System.load
        target found in the APK. Use this to build the Ghidra/unidbg worklist instead of
        manually collecting native methods and library names class by class.

        jni_name_candidate is the short-form JNI symbol (Java_<class>_<method>) — an overloaded
        native may actually be exported under the long-form (signature-suffixed) symbol instead
        if the short form is ambiguous in the native library's export table.

        Args:
            instance_id: Target JADX instance name.
        Returns:
            dict: {native_methods: [{class_name, raw_class_name, method_name, raw_method_name,
            param_types_frida, jni_name_candidate}], native_method_count, loaded_libraries:
            [{name, found_in_class}], loaded_library_count, note}
get_package_classestool Get classes by package prefix for APK or JAR. Use auto=true to detect main package from manifest.
Get classes by package prefix for APK or JAR. Use auto=true to detect main package from manifest.

        Args:
            package: Package prefix. auto: Auto-detect main package. include_inner: Include inner classes.
            offset/count: Pagination (max 500). instance_id: Target JADX instance name.
        Returns:
            dict: {package: str, classes: [{name, is_inner}], total_matched, has_more}
get_resource_filetool Fetch resource file content by path. Auto-chunked if >8KB.
Fetch resource file content by path. Auto-chunked if >8KB.

        Args:
            resource_name: Path like 'res/layout/activity_main.xml'. chunk: 0=first, N=continue.
            instance_id: Target JADX instance name.
        Returns:
            dict: {content: str, _chunking: {...}} — call again with chunk=N if has_more=true.
get_smali_of_classtool Fetch Dalvik smali bytecode of a class. Auto-chunked for large output (>8KB).
Fetch Dalvik smali bytecode of a class. Auto-chunked for large output (>8KB).

        Args:
            class_name: Fully qualified class name (use $ for inner classes). chunk: 0=first, N=continue.
            instance_id: Target JADX instance name.
        Returns:
            dict: {response: str, _chunking: {...}} — call again with chunk=N if has_more=true.
get_smali_of_methodtool Extract one method's Dalvik smali block from its class — the smali counterpart ofNetwork
Extract one method's Dalvik smali block from its class — the smali counterpart of
        get_method_source. Avoids binary-searching chunked get_smali_of_class output (100K+
        chars / ~19 chunks for an obfuscated class) to locate one method's bytecode by hand.

        Args:
            class_name: Fully qualified class name.
            method_name: Method name (deobfuscated or raw). Use '<init>'/'<clinit>' for
                constructors/static initializers.
            method_signature: Descriptor to disambiguate overloads — either the shortId form
                'onCreate(Landroid/os/Bundle;)V' (same values as available_descriptors from
                other method endpoints) or just the '(args)ret' portion (optional).
            instance_id: Target JADX instance name.
        Returns:
            dict: single match: {class_name, raw_class_name, method_name, descriptor, smali,
            overload_count: 1}. Multiple overloads without method_signature: {overload_count,
            matches: [{descriptor, smali}], hint}. No match: 404 with available_descriptors.
get_stringstool Get APK strings. Modes: summary (default)|list|search (needs query)|get (needs key).
Get APK strings. Modes: summary (default)|list|search (needs query)|get (needs key).

        Args:
            mode: summary|list|search|get. query: Keyword for search. key: Key name for get.
            locale: e.g. "values", "values-en". offset/limit: Pagination. instance_id: Target JADX instance name.
        Returns:
            dict: Mode-dependent; summary={total_strings, sample_keys}, search={matches: [{key, value}]}
get_tagstool Query classification tags for the current APK with optional filters.
Query classification tags for the current APK with optional filters.

        Args:
            target_type: Filter by type. target_name: Filter by name. apk_hash: Filter by APK hash.
            instance_id: Target JADX instance name.
        Returns:
            dict: {tags: [...], count}
get_task_resulttool Poll the result of a submitted background task.
Poll the result of a submitted background task.

        Args:
            ticket: Ticket string returned by submit_security_scan or submit_callgraph.
        Returns:
            dict: {status:"running"|"done"|"error"|"not_found", result?}
                  When status="running", retry after retry_after_seconds.
get_warmup_statustool Poll progress of the background cache warmup (auto-started on file load, or via warm_cache()).
Poll progress of the background cache warmup (auto-started on file load, or via warm_cache()).

        Use this to decide what you can do RIGHT NOW vs what you must still wait for — check
        `capabilities` first, then use `eta_seconds`/`eta_basis` if you need to wait.

        Returns:
            dict:
            - phase: current warmup stage name, one of ENGINE_INIT | PHASE1_DECOMPILE | PHASE2_INDEX |
              PHASE3_GRAPH | PHASE4_USEPLACES | FAST_RESTORE | DONE | IDLE | CANCELLED | ERROR.
            - running: whether the Phase-1..4 warmup pipeline is actively running right now.
            - total / processed / failed: Phase-1 decompile counters (classes queued / done / errored).
            - skipped_libraries: classes excluded because skip_libraries=True was used to start warmup.
            - percentage: Phase-1 decompile-only completion, 0-100 (processed/total). NOT the overall
              warmup progress — use overall_progress_pct for that.
            - elapsed_seconds: seconds since this warmup run started (or total run time if finished).
            - trigram_build_running: whether the in-memory trigram index is currently being built.
            - trigram_count: number of trigram entries built so far (0 if using the mmap shard index
              instead — see capabilities.code_search for the authoritative readiness signal).
            - trigram_skip_reason: present only if trigram build was skipped, e.g. "low-heap"; absent
              (key missing) otherwise.
            - use_places_ready: whether the precise xref-with-snippet index has finished its one-time
              harvest.
            - use_places_harvest_running / use_places_harvest_processed / use_places_harvest_total:
              background harvest progress for precise cross-reference snippets (runs after core
              warmup finishes; does not block other capabilities).
            - use_places_skip_reason: present only if the harvest was skipped, e.g. "low-heap"; absent
              (key missing) otherwise.
            - warming_up: single boolean = "is anything still warming" (core pipeline OR the
              use-places harvest). False means everything below has settled into its final state.
            - overall_progress_pct: 0-100 blended progress across ALL phases (decompile + trigram +
              graph + use-places harvest), weighted by each phase's typical cost share. This is the
              number to show a human/progress bar — percentage above is only Phase-1.
            - eta_seconds: rough estimate of seconds remaining until warmup fully settles (null while
              there isn't enough data yet, e.g. right at the start of a phase). Extrapolated from
              elapsed time and current progress rate, not a hard guarantee.
            - eta_basis: what eta_seconds was computed from — "overall-progress-rate" (normal
              extrapolation from Phase-1..3 progress), "fast-restore-estimate" (hot-start path
              restoring from existing cache), "useplaces-harvest" (core warmup done, only the
              background snippet harvest remains), "starting" (just began, no rate yet), "idle"
              (nothing running), or "done".
            - capabilities: dict mapping capability name -> readiness string. Check this BEFORE
              calling the corresponding tool:
                - "ready": safe to use now.
                - "warming": still being built; the corresponding tool call may be slow, return
                  partial results, or should be retried later.
                - "skipped:low-heap": permanently unavailable this run because the host doesn't have
                  enough heap; do not poll waiting for "ready" — it will never arrive.
              Keys:
                - metadata_search: class/method name and structure search. Ready as soon as the APK
                  is loaded (does not depend on warmup).
                - class_source: decompiled Java source lookup (get_class_source). Ready
                  quickly — served from cache once warm, falls back to lazy live-decompile before that.
                - smali: smali disassembly lookup. Same readiness story as class_source.
                - live_decompile: on-demand decompilation of an arbitrary class. "warming" until the
                  one-time JADX engine init completes (a real cost paid once, ~13s on a large APK);
                  after that, individual live-decompile calls are fast.
                - code_search: full-text/regex search over decompiled code bodies
                  (search_in='code' on the search tool). Do NOT issue search_in='code' calls while
                  this is not "ready" — results will be empty or incomplete, not just slow. If this
                  is "skipped:low-heap", code-body search is unavailable for the whole session; use
                  metadata_search (name/structure) instead.
                - xref_class_level: class-level cross-reference graph (who calls/uses this class).
                  "warming" until the usage graph index finishes building.
                - precise_xref_snippets: cross-references with exact call-site source snippets (as
                  opposed to class-level-only). "warming" while the one-time use-places harvest is
                  still running; falls back to a slower live lookup path in the meantime, so calls
                  don't fail, they're just not instant.
            - effective_decompile_workers: number of parallel decompile worker threads this warmup
              run is actually using. Higher = warmup finishes faster (more CPU/heap spent now);
              use this to sanity-check why a run is faster/slower than expected on a given host.
            - decompile_workers_source: where effective_decompile_workers came from — "auto" (sized
              automatically from available heap and CPU cores) or "override" (pinned by the
              DELAMAIN_WARMUP_DECOMPILE_WORKERS environment variable, ignoring auto-sizing). Useful
              for spotting an operator-imposed speed limit vs. a hardware-limited one.
get_xref_resulttool Poll the result of an xref resolution submitted via submit_xref().
Poll the result of an xref resolution submitted via submit_xref().

        Args:
            ticket: Ticket ID from submit_xref(). offset/count: Pagination over the reference list
                (single-target mode only — batch results aren't paginated, same as batch_get_xrefs).
            instance_id: Target JADX instance name.
        Returns:
            dict: status="running" (poll again, see retry_after_seconds) |
                  status="done" — single-target mode: {references: [...], pagination: {total, offset,
                  limit, count, has_more, ...}, resolution, via, distinct_referrer_class_count[, hint]}
                  (same field meanings as get_xrefs — see its docstring for what resolution/via/
                  distinct_referrer_class_count mean and why row counts can differ by granularity);
                  batch mode: {results: [...], total} (same shape as batch_get_xrefs, unpaginated) |
                  status="not_found" (ticket expired, or target class/method/field doesn't exist —
                  check message) | status="error" (check message)
get_xrefstool Find cross-references to a class, method, or field.
Find cross-references to a class, method, or field.

        About to call this again on a caller you just found — walking a chain one hop at a time?
        Stop: use find_callers_chain(target_class, target_method) for the whole backward chain in
        one call, or export_callgraph for a full multi-method call graph in either direction.

        Args:
            target_type: class|method|field. class_name: Fully qualified class name.
            member_name: Method or field name (required for method/field). offset/count: Pagination.
            include_snippet: If True, attach the surrounding source code snippet at each call site.
                Useful for quickly understanding usage context without opening each referencing class.
                Only the current page (offset..offset+count) is decompiled for snippets — turn the
                page to get snippets for more rows; missing snippet on a row is not a missing
                reference. For a high-fan-in target where you just need presence/count, leave this
                False and paginate with plain rows first. Each row's 'snippet' field is null if
                retrieval failed.
            context_lines: Lines of context before/after the reference in the snippet (default: 3).
                Only used when include_snippet=True.
            instance_id: Target JADX instance name.
        Returns:
            dict: {references: [{class, raw_class, method, raw_method, from_method, raw_from_method,
                source_line[, decompiled_line, code_snippet, snippet]}], pagination: {total, offset,
                limit, count, has_more, ...}, resolution, via, distinct_referrer_class_count[, hint]}.

                resolution/via describe how the result was computed and its row granularity:
                - "class-level"/"usage-graph" (target_type=class, include_snippet=False): one row
                  per distinct referrer class, no line numbers. Fastest, no caller decompile.
                - "precise"/"use-places-store" (target_type=class, include_snippet=True, index warm):
                  one row per call site (exact line), from a persisted index — instant.
                - "live-method-level"/"live-decompile": fast indices missing or incomplete; computed
                  by live-decompiling each referrer. Mixed granularity — a row per call site where a
                  precise position was resolvable, else per referencing method, else per class.
                - "method-level"/"use-graph" (target_type=method, include_snippet=False): one row per
                  distinct caller method, no line numbers.
                - target_type=field never sets resolution/via (always live, method-level rows).

                pagination.total counts rows in the CHOSEN granularity, so it can legitimately differ
                across include_snippet values for the same target (e.g. 3 with include_snippet=False
                vs 4 with include_snippet=True) without any reference being lost — that's class-level
                dedup vs per-call-site rows, not a bug. distinct_referrer_class_count is the number of
                distinct referrer classes across the FULL result regardless of row granularity, so you
                can confirm the underlying referrer set is unchanged even when the row count differs.

                On a live-decompile path (resolution="live-method-level"), a 25s server-side deadline
                may cut the scan short: the result then carries partial_results=true and partial_reason
                explaining the cutoff and what to do (warmup, narrower target, or submit_xref for the
                deadline-free async path). Don't treat a partial result as "this target has no more
                referrers" — re-check partial_reason before drawing that conclusion.
import_rename_mappings_tooltool Batch-apply rename mappings (same format as export_rename_mappings output).Network
Batch-apply rename mappings (same format as export_rename_mappings output).

        Args:
            mappings: List of {type, original_name, new_name, class_context} dicts.
            instance_id: Target JADX instance name.
        Returns:
            dict: {success: bool, total: int, applied: int, failed: int, errors: [str]}
jadx_inittool Return this gateway's tool version and the running jadx version, for a client-side compatibility check.
Return this gateway's tool version and the running jadx version, for a client-side compatibility check.
jar_get_bytecodetool Get bytecode/class structure (javap-style) for APK or JAR classes.
Get bytecode/class structure (javap-style) for APK or JAR classes.

        Args:
            class_name: Fully qualified class name. instance_id: Target JADX instance name.
        Returns:
            dict: {bytecode: str, field_count, method_count, file_type}
jar_get_dependenciestool Analyze JAR dependencies: Maven pom.properties, MANIFEST Class-Path, Spring Boot BOOT-INF/lib.
Analyze JAR dependencies: Maven pom.properties, MANIFEST Class-Path, Spring Boot BOOT-INF/lib.

        Args:
            instance_id: Target JADX instance name.
        Returns:
            dict: {group_id, artifact_id, version, dependencies: [{name, version, source}]} or NOT_APPLICABLE.
jar_get_entry_pointstool Discover entry points in JAR: Main-Class, Spring Boot Start-Class, main() methods.
Discover entry points in JAR: Main-Class, Spring Boot Start-Class, main() methods.

        Args:
            instance_id: Target JADX instance name.
        Returns:
            dict: {primary_entry: str, entry_points: [{type, class, priority}]} or NOT_APPLICABLE.
jar_get_manifesttool Read META-INF/MANIFEST.MF from JAR: Main-Class, Implementation-Title/Version, Spring Boot attrs.
Read META-INF/MANIFEST.MF from JAR: Main-Class, Implementation-Title/Version, Spring Boot attrs.

        Args:
            instance_id: Target JADX instance name.
        Returns:
            dict: {main_class, implementation_title, all_attributes} or NOT_APPLICABLE for APK.
jar_get_servicestool Read META-INF/services/* from JAR to discover SPI service providers (JDBC, logging, etc.).
Read META-INF/services/* from JAR to discover SPI service providers (JDBC, logging, etc.).

        Args:
            instance_id: Target JADX instance name.
        Returns:
            dict: {services: [{interface, implementations, count}]} or NOT_APPLICABLE for APK.
list_analysis_sessionstool List all saved analysis sessions with names, save times, and notes previews.
List all saved analysis sessions with names, save times, and notes previews.

        Returns:
            dict: {sessions: [{session_name, saved_at, file_type, notes_preview}], count}
list_available_files_tooltool List APK/JAR/AAR/DEX files available in the JADX sandbox. Use before load_file.Network
List APK/JAR/AAR/DEX files available in the JADX sandbox. Use before load_file.

        Args:
            subdir: Optional sub-path to scope listing. pattern: Glob like "*.apk" (default "*").
            recursive: Recurse into subdirs. instance_id: Target JADX instance.
        Returns:
            dict: {root, files: [{path, size_bytes, extension, loadable}], count}
list_bookmarkstool List bookmarks for the current APK with optional filters.
List bookmarks for the current APK with optional filters.

        Args:
            target_type: Filter by type. target_name: Filter by name. apk_hash: Filter by APK hash.
            instance_id: Target JADX instance name.
        Returns:
            dict: {bookmarks: [...], count}
list_loaded_files_tooltool Show what APK/JAR the JADX backend is currently analyzing and whether it is free.Network
Show what APK/JAR the JADX backend is currently analyzing and whether it is free.

        Args:
            instance_id: Unused — this gateway has a single fixed JADX backend.
        Returns:
            dict: {instances: [{name, loaded_file, decompile_progress, available,
                   version_name, version_code, input_hash}], count, free_count}
list_packagestool List all packages in the APK/JAR sorted by class count with library-detection flags.
List all packages in the APK/JAR sorted by class count with library-detection flags.

        Args:
            instance_id: Target JADX instance name.
        Returns:
            dict: {total_classes, total_packages, packages: [{name, class_count, is_likely_library}]}
list_resources_by_typetool List APK resource files, either as a type-distribution summary or filtered by type.
List APK resource files, either as a type-distribution summary or filtered by type.

        Without resource_type: returns total_files + a type_distribution histogram (layout,
        drawable, values, xml, raw, menu, anim, color, mipmap, font, ...).
        With resource_type: returns the paginated list of file paths under that type
        (matches "res/<type>/..." and qualified variants like "res/<type>-v21/...").

        Args:
            resource_type: Filter e.g. "layout", "drawable", "values" (omit for summary).
            offset/limit: Pagination when resource_type is set (limit capped at 500).
            instance_id: Target JADX instance name.
        Returns:
            dict: Summary={type_distribution, total_files} or
            {files: [str, ...], total, offset, limit, has_more} when filtered.
load_analysis_sessiontool Load a previously saved analysis session to restore context.
Load a previously saved analysis session to restore context.

        Args:
            session_name: Session name to load.
        Returns:
            dict: {metadata: {saved_at, file_info}, context: {...}} or SESSION_NOT_FOUND error.
load_file_tooltool Load an APK/JAR/AAR/DEX into JADX without touching the GUI. Returns immediately (202).Network
Load an APK/JAR/AAR/DEX into JADX without touching the GUI. Returns immediately (202).

        Loading is async, and index warmup starts automatically after it. The response carries a
        warmup snapshot (phase, eta_seconds, capabilities) plus _ai_instruction — read them instead
        of guessing when to start work:
          - poll get_decompile_status until the class tree is loaded;
          - metadata search (search_in='class'/'method'/'field'), get_class_source and smali are
            usable from that moment;
          - poll get_warmup_status and wait for capabilities.code_search == "ready" before any
            search_in='code' or high-fan-in xref call. Issuing those during warmup is the slowest
            possible timing: the content index does not exist yet and warmup owns the CPU.

        Args:
            path: Sandbox-relative path (e.g. "target.apk"). mode: replace|append.
            instance_id: Target JADX instance.
        Returns:
            dict: {dispatched: bool, mode, path, ready: false, poll_with: "get_decompile_status",
                   auto_warmup: bool, warmup_status_endpoint,
                   warmup: {phase, eta_seconds, capabilities}, _ai_instruction}
renametool Unified rename for classes, methods, fields, and packages. Triggers 30s cache cooldown.Network
Unified rename for classes, methods, fields, and packages. Triggers 30s cache cooldown.

        Args:
            target_type: class|method|field|package. old_name: Current name. new_name: New name.
            class_name: Required for method/field. method_signature: JVM descriptor for overloads.
            dry_run: Preview without renaming. instance_id: Target JADX instance name.
        Returns:
            dict: {success: bool, message: str} or dry_run: {target_exists: bool, target_info: {...}}
rename_variable_tooltool Rename a local variable inside a method using JADX SSA tracking.Network
Rename a local variable inside a method using JADX SSA tracking.

        Args:
            class_name: Fully qualified class name. method_name: Method name.
            variable_name: Current variable name. new_name: New name.
            reg: Register number (disambiguation). ssa: SSA version (disambiguation).
            instance_id: Target JADX instance name.
        Returns:
            dict: {result: str} on success or {error: str, status: 404} if not found.
resolve_resource_idtool Resolve Android resource IDs to names and vice versa (resources.arsc lookup).
Resolve Android resource IDs to names and vice versa (resources.arsc lookup).

        Pass exactly one of resource_id/name; passing neither lists all id<->name mappings
        (paginated). resource_id accepts hex ("0x7f0a0000") or decimal ("2131361792"); name is
        matched as a substring against "<type>/<key>" (e.g. "layout/activity_main").

        Args:
            resource_id: Hex or decimal resource ID to resolve to a name.
            name: Substring to search for among resource names (returns matches, capped by limit).
            offset/limit: Pagination for the list-all mode (limit capped at 1000).
            instance_id: Target JADX instance name.
        Returns:
            dict: id->name: {found, type_name, key_name, full_name, id_hex, id_decimal}.
            name->id: {matches: [...], count}. list-all: {entries: [...], total, has_more}.
run_security_scantool Automated security scan for hardcoded secrets, weak crypto, insecure network, dangerous APIs.Network
Automated security scan for hardcoded secrets, weak crypto, insecure network, dangerous APIs.

        Args:
            scan_type: full|secrets|crypto|network|permissions. package: Scope filter.
            instance_id: Target JADX instance name.
        Returns:
            dict: {summary: {total_findings, high_severity, medium_severity}, findings: [{rule_id, severity, matches}]}
save_analysis_sessiontool Save AI analysis context to a local JSON file for later restoration.
Save AI analysis context to a local JSON file for later restoration.

        Args:
            session_name: Name (alphanumeric, hyphens, underscores; 1-100 chars).
            context: Dict with keys: analyzed_classes, findings, notes, current_focus, next_steps.
            instance_id: Target JADX instance name.
        Returns:
            dict: {success, session_name, saved_at, file_path}
search_classes_by_keywordtool Search classes by keyword. Default searches class/method/field names (fast, <100ms).Network
Search classes by keyword. Default searches class/method/field names (fast, <100ms).

        search_in options:
        - 'class,method,field' (default) — metadata-only, always fast, no lock needed
        - 'code' — mmap shard index search inside source; call get_index_stats() first and check
          shard_index.built/covered_classes for availability. Broad/common terms return
          partial_results (search_info.broad_term=true + candidate_count/hint) instead of an
          exhaustive scan — narrow the term or use search_in='class'/'method' instead of retrying.

        Content-scan admission control (a code/comment search NEVER runs unbounded):
        - search_info.content_scan_skipped=true → no content index could prefilter this query
          (index still warming, or a regex/comment query no index can prefilter), so the content
          phase was skipped in milliseconds instead of timing out at 60s. Metadata matches in the
          same result are complete. Follow search_info.hint: retry once get_index_stats reports
          capabilities.code_search=ready, or switch to search_in='class'/'method'/'field'.
        - search_info.content_scan_sampled=true → the term was too broad, so only
          search_info.content_scanned classes were content-scanned; metadata matches are complete.

        Hard limits (hex/UUID/base64/long paths → never indexed): see get_index_stats docstring.

        For code/comment search on large APKs, prefer submit_code_search (async, no timeout risk).

        Args:
            search_term: Keyword. package: Package filter (recommended to reduce noise).
            exclude: Comma-separated package prefixes to exclude.
            search_in: 'class,method,field' (default) | 'code' | 'comment' | any combination.
            match_mode: substring (default)|exact|prefix|regex. count: Max results (default 20).
            instance_id: Target JADX instance name.
        Returns:
            dict: {classes: [...], total: int, has_more: bool}
search_native_methodstool Find all native (JNI) methods across the APK — reads DEX metadata, no decompilation needed.Network
Find all native (JNI) methods across the APK — reads DEX metadata, no decompilation needed.

        Args:
            package: Optional package filter. offset: Pagination start.
            count: Max results (max 200, default 50). instance_id: Target JADX instance name.
        Returns:
            dict: {native_methods: [{class_name, method_name, param_types_frida}], has_more: bool}
search_string_literalstool Search for string constants (URL, API key, SQL, etc.) embedded in DEX bytecode.
Search for string constants (URL, API key, SQL, etc.) embedded in DEX bytecode.

        This tool scans Java/Kotlin string literals compiled directly into the
        DEX — NOT Android resource strings from strings.xml (use get_strings for those).

        IMPORTANT COVERAGE LIMITATION: By default, only already-decompiled classes are
        scanned. If coverage_pct in the response is low (e.g. < 80%), an empty result
        does NOT mean the string is absent — it may simply not be decompiled yet.
        Check coverage_note in the response for details.

        To get complete coverage for a specific package, use class_filter + force_decompile=True.
        force_decompile requires class_filter to prevent full-APK decompilation.

        Typical use cases:
        - Find hardcoded API endpoints:       pattern="https://api.", regex=False
        - Find potential API keys/secrets:    pattern="[A-Za-z0-9]{32,}", regex=True
        - Complete scan of a package:         class_filter="com.example.auth", force_decompile=True

        Args:
            pattern: String to search for, or a regex pattern when regex=True.
            regex: When True, treat pattern as a Java regular expression (default False).
            min_length: Skip string literals shorter than this (default 8).
            class_filter: Restrict to classes whose fully-qualified name contains this substring.
                          Required when force_decompile=True.
            limit: Maximum results to return (default 100, max 200 server-side).
            force_decompile: When True, trigger decompilation of undecompiled classes in the
                             filtered set (requires class_filter). Slower but ensures complete
                             coverage of the target package (default False).
            instance_id: Target JADX instance name.
        Returns:
            dict: {
                results: [{class_name: str, literal: str, line_number: int}],
                total: int, truncated: bool,
                scanned_classes: int,  # classes actually searched
                total_classes: int,    # total classes in APK
                coverage_pct: int,     # scanned / total * 100
                coverage_note: str,    # human-readable coverage assessment
                cached_percentage_at_scan: int  # % already decompiled at scan time
            }
smart_decompiletool Batch-decompile classes with concurrency control (high=5, normal=3, low=1 concurrent).
Batch-decompile classes with concurrency control (high=5, normal=3, low=1 concurrent).

        Args:
            class_names: Fully qualified class names. priority: high|normal|low concurrency tier.
            instance_id: Target JADX instance name.
        Returns:
            dict: {succeeded, failed, already_cached, results: [{class_name, status, time_ms}]}
submit_callgraphtool Submit a call graph export as a background task. Returns a ticket immediately.
Submit a call graph export as a background task. Returns a ticket immediately.

        Args:
            class_name: Fully qualified class name (e.g. "com.example.MyClass").
            method_name: Method name to trace.
            depth: Traversal depth 1-6 (default 3).
            output_format: "json" or "dot".
            instance_id: Target JADX instance name.
        Returns:
            dict: {ticket, status:"submitted", retry_after_seconds:5}
submit_code_searchtool Submit a background code/comment search. Returns a ticket ID immediately — no timeout risk.Network
Submit a background code/comment search. Returns a ticket ID immediately — no timeout risk.

        Preferred over search_classes_by_keyword(search_in='code') for large APKs (>10k classes).

        Async workflow:
        1. ticket = submit_code_search(search_term, package=...).ticket
        2. Wait retry_after_seconds (usually 3-10s), then:
        3. result = get_code_search_result(ticket) — repeat until status="done"
        4. result.classes contains matching classes; paginate with offset=

        Hard limits (hex/UUID/base64/long paths → never indexed): see get_index_stats docstring.
        Broad/common terms return partial_results (search_info.broad_term=true) instead of an
        exhaustive scan — narrow the term or use search_in='class'/'method' rather than retrying.
        search_info.content_scan_skipped=true means no content index could prefilter the query yet
        (see search_info.hint): retry once get_index_stats reports capabilities.code_search=ready,
        or use a metadata search now — do not re-submit the same code search in a tight loop.

        Args:
            search_term: Short human-readable token (≤20 chars ideal). package: Package filter.
            search_in: code (default) | comment. match_mode: substring|exact|prefix|regex.
            instance_id: Target JADX instance name.
        Returns:
            dict: {ticket, status: "submitted"|"done", retry_after_seconds}
submit_security_scantool Submit a security scan as a background task. Returns a ticket immediately.Network
Submit a security scan as a background task. Returns a ticket immediately.

        Args:
            scan_type: full|secrets|crypto|network|permissions.
            package: Optional package filter to narrow scope.
            instance_id: Target JADX instance name.
        Returns:
            dict: {ticket, status:"submitted", retry_after_seconds:5}
submit_xreftool Submit a background xref resolution. Returns a ticket immediately — no 120s timeout risk.
Submit a background xref resolution. Returns a ticket immediately — no 120s timeout risk.

        Prefer this over get_xrefs / batch_get_xrefs on large APKs, or whenever include_snippet=True
        is needed and the class's referrers haven't been decompiled yet (the sync endpoints fall back
        to a full live decompile of every caller, which can hit the 120s HTTP timeout on big APKs).

        Two mutually exclusive request shapes:
        - single target: target_type=class|method|field, class_name, member_name (method/field name).
        - batch: targets=["class:com.example.Foo", "method:com.example.Bar:myMethod"] (max 10) — same
          format as batch_get_xrefs. When targets is given, target_type/class_name are ignored.

        Async workflow:
        1. ticket = submit_xref(target_type="class", class_name=...).ticket
        2. Wait retry_after_seconds, then:
        3. result = get_xref_result(ticket) — repeat until status="done"
        If the underlying precomputed index is already warm, this returns status="done" on the very
        first call (no polling needed) — check status before polling.

        Args:
            target_type: class|method|field (single-target mode; ignored if targets is set).
            class_name: Fully qualified class name (single-target mode).
            member_name: Method or field name (required for target_type=method|field).
            targets: Batch mode target list, format "type:class[:member]" (max 10).
            include_snippet: Attach surrounding source at each call site (single-target mode only).
                Snippets are generated for at most the first 200 references (ASYNC_SNIPPET_CAP);
                rows beyond that cap have no 'snippet' field even though the reference itself is
                still present in the result — absence there means "not decompiled", not "not found".
            context_lines: Snippet context lines (default 3, only used with include_snippet=True).
            instance_id: Target JADX instance name.
        Returns:
            dict: {ticket, status: "submitted"|"done", retry_after_seconds}. Never contains the
                references themselves, even when status="done" — always follow up with
                get_xref_result(ticket) to fetch the data (retry_after_seconds is 0 in that case,
                so it's safe to call immediately without waiting).
trace_data_flowtool Trace forward call-graph reachability via BFS and flag Android sinks (network, webview, command, storage, IPC, crypto).
Trace forward call-graph reachability via BFS and flag Android sinks (network, webview, command, storage, IPC, crypto).

        Uses exact full-qualified class + method matching for sink detection to avoid false positives.

        Args:
            source_class: Fully qualified class name. source_method: Starting method name.
            max_depth: BFS depth 1-5 (default 3). instance_id: Target JADX instance name.
        Returns:
            dict: {call_tree, sinks_found: [{method, full_class, sink_type, sink_severity, path}],
                   analysis_type, analysis_note, stats}
warm_cachetool Manually trigger a full background cache warmup (decompile + trigram + xref graph).
Manually trigger a full background cache warmup (decompile + trigram + xref graph).

        The server already auto-triggers this warmup right after a file is loaded (unless disabled
        via DELAMAIN_WARMUP_ON_START=false on the Java side). Call this tool yourself only when: the
        server was started with warmup-on-load disabled, a previous warmup was cancelled/failed and
        needs a restart, or you want to redo it with a different skip_libraries setting. Calling it
        while a warmup is already running is a no-op / returns the current run's state (it does not
        start a second overlapping pass). No busy-check: starts immediately and returns; poll
        progress with get_warmup_status().

        Args:
            skip_libraries: Skip known third-party SDK packages (android.*, kotlin.*, etc.) to warm
                only app-owned classes. Default True.
            instance_id: Target JADX instance name.
        Returns:
            dict: {started, total_classes, skipped_libraries, message}

Text the model reads (88)

Every tool, prompt and resource description as written in the code: the model sees all of it, the user usually does not.

get_jadx_guide tool Tool poisoning
Bootstrap guide for JADX reverse-engineering workflows.

        Default call returns a short summary and key rules (~100 tokens).
        verbose=True returns the full workflow guide with all sections (~800 tokens).
        install_skills=True, target='claude' returns the skill file for the AI to write
        to ~/.claude/commands/jadx-workflow.md — the AI MUST get user authorization first.

        Call this at the start of a new reverse-engineering session to orient yourself.

        Args:
            verbose: Return full guide (default False = short summary only).
            install_skills: Return skill file payload to install locally.
            target: 'claude' | 'codex' — required when install_skills=True.
        Returns:
            dict: {guide} or {files_to_write, instruction} when install_skills=True.
get_attack_surface tool
Analyze the Android attack surface: exported components, deep-links, and dangerous permissions.

        This is the recommended first tool for security-focused analysis.
        No warmup required — results are derived from the manifest and metadata.

        Args:
            instance_id: Target JADX instance name.
        Returns:
            dict: {
                activities, services, receivers, providers (exported),
                custom_permissions, dangerous_permissions_used,
                deeplink_summary: [{scheme, host, path}],
                total_exported: int, summary: str
            }
export_callgraph tool
Export the call graph for a method as structured JSON or Graphviz DOT.

        Use this instead of assembling a call graph by hand from repeated get_xrefs /
        method-callees calls — it returns the full multi-method neighborhood in one call.

        Depth is capped at 6 client-side. For deep call chains, start with depth=2
        and increase incrementally.

        Args:
            class_name: Fully qualified class name (e.g. "com.example.LoginActivity").
            method_name: Method name to root the graph at (e.g. "onCreate").
            depth: Traversal depth 1-6 (default 3). Values above 6 are clamped to 6.
            format: "json" (default, nodes+edges dict) or "dot" (Graphviz DOT language string).
            instance_id: Target JADX instance name.
        Returns:
            When format=json: {format, root, depth, nodes:[{id,class,method}], edges:[{from,to}], truncated}
            When format=dot:  {format, dot:"digraph { ... }"}
get_native_surface tool
Aggregate a native/JNI reverse-engineering handoff worklist: every declared native
        method (with a JNI mangled-name candidate) plus every System.loadLibrary/System.load
        target found in the APK. Use this to build the Ghidra/unidbg worklist instead of
        manually collecting native methods and library names class by class.

        jni_name_candidate is the short-form JNI symbol (Java_<class>_<method>) — an overloaded
        native may actually be exported under the long-form (signature-suffixed) symbol instead
        if the short form is ambiguous in the native library's export table.

        Args:
            instance_id: Target JADX instance name.
        Returns:
            dict: {native_methods: [{class_name, raw_class_name, method_name, raw_method_name,
            param_types_frida, jni_name_candidate}], native_method_count, loaded_libraries:
            [{name, found_in_class}], loaded_library_count, note}
add_annotation tool
Add a persistent text annotation to a class/method/field (stored in local SQLite).

        Args:
            target_type: class|method|field. target_name: Fully qualified name. content: Annotation text.
            author: Author name. apk_hash: Leave empty to use currently open APK. instance_id: Target JADX instance.
        Returns:
            dict: {success, id, target_type, target_name, apk_hash}
get_annotations tool
Query annotations for the current APK with optional filters.

        Args:
            target_type: Filter by type. target_name: Filter by name. apk_hash: Filter by APK hash.
            instance_id: Target JADX instance name.
        Returns:
            dict: {annotations: [...], count}
delete_annotation tool
Delete an annotation by its numeric ID (from get_annotations).

        Args:
            annotation_id: Numeric annotation ID. instance_id: Target JADX instance name.
        Returns:
            dict: {success, deleted_id}
add_bookmark tool
Create a labeled bookmark for an important code location (stored in local SQLite).

        Args:
            target_type: class|method|field. target_name: Fully qualified name. label: e.g. "crypto logic".
            note: Optional description. author: Author name. apk_hash: APK hash. instance_id: Target JADX instance.
        Returns:
            dict: {success, id, label, target_type, target_name, apk_hash}
list_bookmarks tool
List bookmarks for the current APK with optional filters.

        Args:
            target_type: Filter by type. target_name: Filter by name. apk_hash: Filter by APK hash.
            instance_id: Target JADX instance name.
        Returns:
            dict: {bookmarks: [...], count}
delete_bookmark tool
Delete a bookmark by its numeric ID (from list_bookmarks).

        Args:
            bookmark_id: Numeric bookmark ID. instance_id: Target JADX instance name.
        Returns:
            dict: {success, deleted_id}
add_tag tool
Add a classification tag to a code element (stored in local SQLite).

        Args:
            target_type: class|method|field. target_name: Fully qualified name. tag: e.g. "crypto", "network".
            author: Author name. apk_hash: APK hash. instance_id: Target JADX instance name.
        Returns:
            dict: {success, id, tag, target_type, target_name, apk_hash}
get_tags tool
Query classification tags for the current APK with optional filters.

        Args:
            target_type: Filter by type. target_name: Filter by name. apk_hash: Filter by APK hash.
            instance_id: Target JADX instance name.
        Returns:
            dict: {tags: [...], count}
delete_tag tool
Delete a tag by its numeric ID (from get_tags).

        Args:
            tag_id: Numeric tag ID. instance_id: Target JADX instance name.
        Returns:
            dict: {success, deleted_id}
get_analysis_summary tool
Get all annotations + bookmarks + tags for the current APK in one call. Use to restore analysis context.

        Args:
            apk_hash: APK hash (leave empty for currently open APK). instance_id: Target JADX instance name.
        Returns:
            dict: {apk_hash, annotations, bookmarks, tags, annotations_count, bookmarks_count, tags_count}
get_all_classes tool
List all classes in the project with pagination support.

        Args:
            offset: Pagination start index. count: Max results (0=all).
            instance_id: Target JADX instance name.
        Returns:
            dict: {classes: [str, ...], total: int}
get_class_source tool
Fetch decompiled Java source of a class. Large classes are auto-chunked (>8KB).

        The first chunk (chunk=0) may carry a decompile_quality flag: "ok" (normal),
        "degraded" (JADX fell back to a simpler decompile mode — output may be structurally
        incomplete), "failed" (JADX recorded a hard per-class error or never finished
        processing — treat this source as unreliable), or "unknown" (no quality verdict cached
        for this class yet, e.g. a disk-restored/cold-cache entry — not a signal either way).
        When degraded/failed, a "hint" field is included with the recommended next step. On
        degraded/failed, fall back to get_smali_of_class for the raw bytecode, call
        get_decompile_diag for the full structured diagnostic, or retry via decompile_with_mode.
        decompile_quality/hint are only attached on chunk=0, not on continuation chunks.

        If response is an empty string, chunk=0 also carries source_status explaining why:
        "inner_class_inlined" (source is merged into the outer class — call get_class_source on
        that instead), "decompile_failed" (see decompile_quality/hint), "not_in_static_dex"
        (dynamically generated/native-bridge class — Java source will never exist), or
        "unknown_empty" (no confident cause). An _ai_instruction field carries the matching
        next-action for the first three.

        Once referrer_count exceeds 5, an _ai_instruction suggests find_callers_chain or
        export_callgraph instead of manually walking get_class_source per referrer.

        Args:
            class_name: Fully qualified class name. chunk: 0=first, N=continue chunked response.
            instance_id: Target JADX instance name.
        Returns:
            dict: {response: str, _chunking: {...}, decompile_quality?: str, hint?: str,
            source_status?: str, referrer_count?: int, _ai_instruction?: str} — call again with
            chunk=N if has_more=true.
batch_get_class_source tool
Fetch 2-20 class sources in one request with auto size-management. Use get_class_source for a single class.

        Each page returns whole, ready-to-use class objects (never a JSON fragment to reassemble).
        When a batch's total size exceeds the inline byte budget, the response comes back paginated
        by whole classes: has_more=true plus next_offset. Call again with offset=next_offset to fetch
        the remaining classes — no parsing or concatenation needed on your side.

        Args:
            class_names: List of fully qualified class names (max 20, same list every call).
            offset: Index into class_names to resume from (0=first page; use next_offset from a
            prior response to continue). force: Bypass the pre-flight size guard. instance_id:
            Target JADX instance name.
        Returns:
            dict: {classes: [{name, found, content|error}], total, returned, offset, found,
            has_more, next_offset?} or BATCH_TOO_LARGE error with suggestions. _ai_instruction is
            set when has_more=true, telling you the next offset to call.
get_methods_of_class tool
List all methods of a class with Frida-friendly metadata (is_static, overload_count, etc.).

        Args:
            class_name: Fully qualified class name. instance_id: Target JADX instance name.
        Returns:
            dict: {methods: [{name, is_static, is_native, overload_count, return_type, ...}], count}
get_fields_of_class tool
List all fields of a class with Frida-compatible type information (type_frida).

        Args:
            class_name: Fully qualified class name. instance_id: Target JADX instance name.
        Returns:
            dict: {fields: [{name, type, type_frida, is_static, is_final, modifiers}], count}
get_smali_of_class tool
Fetch Dalvik smali bytecode of a class. Auto-chunked for large output (>8KB).

        Args:
            class_name: Fully qualified class name (use $ for inner classes). chunk: 0=first, N=continue.
            instance_id: Target JADX instance name.
        Returns:
            dict: {response: str, _chunking: {...}} — call again with chunk=N if has_more=true.
get_main_activity_class tool
Fetch the app entry-point Activity class as defined in AndroidManifest.xml.

        Args:
            chunk: 0=first, N=continue chunked response. instance_id: Target JADX instance name.
        Returns:
            dict: {content: str, _chunking: {...}} — call again with chunk=N if has_more=true.
get_class_info tool
Get structured class metadata: inheritance, interfaces, method/field names, native methods.

        Args:
            class_name: Fully qualified class name. instance_id: Target JADX instance name.
        Returns:
            dict: {class_name, package, super_class, interfaces, method_names, field_names, native_count}
get_decompile_status tool
Check live JADX runtime state: decompile progress, memory usage, and search lock.

        ALWAYS call this before resource-intensive operations (get_class_source, xrefs, code search).

        Decision rules:
        - memory.usage_percentage > 85% → reduce batch sizes to ≤5, skip get_smali_of_class
        - search_lock.locked = true → wait 5s and retry (another operation holds the write lock)

        Args:
            instance_id: Target JADX instance name.
        Returns:
            dict: {cached_percentage, memory.usage_percentage, search_lock.locked, status}
list_packages tool
List all packages in the APK/JAR sorted by class count with library-detection flags.

        Args:
            instance_id: Target JADX instance name.
        Returns:
            dict: {total_classes, total_packages, packages: [{name, class_count, is_likely_library}]}
get_code_metadata tool
Get precise symbol reference metadata for a class: which class/method/field is
        referenced at every source position. This is the basis for "go to definition" / "what
        symbol is here" navigation, and for locating exactly where a class is referenced by
        another class (pair with get_class_source to know the surrounding code).

        Without position: returns the reference list for the whole class (capped by max).
        With position: resolves the single symbol at that char-offset (exact match, else the
        enclosing node, else the nearest node before it).

        Names follow the raw/alias dual-track: raw_name is the original/runtime name (use for
        Frida hooks), alias_name is the deobfuscated display name.

        Args:
            class_name: Fully qualified class name. position: Char-offset to resolve a single
            symbol at. max: Cap on the reference list size (default 300, ignored when position
            is set). instance_id: Target JADX instance name.
        Returns:
            dict: {has_metadata, reference_count, references: [{kind, raw_name, alias_name,
            position, line, ...}], truncated} or {has_metadata: false, hint} if not yet
            decompiled. With position: {at: {kind, raw_name, alias_name, resolved_by, ...}}.
trace_data_flow tool
Trace forward call-graph reachability via BFS and flag Android sinks (network, webview, command, storage, IPC, crypto).

        Uses exact full-qualified class + method matching for sink detection to avoid false positives.

        Args:
            source_class: Fully qualified class name. source_method: Starting method name.
            max_depth: BFS depth 1-5 (default 3). instance_id: Target JADX instance name.
        Returns:
            dict: {call_tree, sinks_found: [{method, full_class, sink_type, sink_severity, path}],
                   analysis_type, analysis_note, stats}
find_callers_chain tool
Trace backward "who can reach this" call chains.

        Two granularities:
        - granularity='class' (default, FAST): instant N-hop BFS over the precomputed usage
          graph — "which classes can reach target_class", returned as per-depth layers. No
          decompilation; scales to thousands of nodes in tens of ms. target_method is ignored.
          Use this first for a broad reachability overview on large APKs.
        - granularity='method' (detailed): per-method caller tree with input-source flagging
          (user input / network / storage). Requires target_method. Heavier (per-hop xref) but
          each hop is fast now; keep max_depth small.

        Args:
            target_class: Fully qualified class name.
            target_method: Method name (required only for granularity='method').
            max_depth: BFS depth 1-12 for class, 1-5 for method (default 3).
            granularity: 'class' | 'method'.
            max_nodes: class-mode safety cap on discovered classes (default 2000).
            instance_id: Target JADX instance name.
        Returns:
            class: {target, layers:[{depth,count,classes}], total_callers, truncated, via}
            method: {caller_tree, sources_found, stats}
smart_decompile tool
Batch-decompile classes with concurrency control (high=5, normal=3, low=1 concurrent).

        Args:
            class_names: Fully qualified class names. priority: high|normal|low concurrency tier.
            instance_id: Target JADX instance name.
        Returns:
            dict: {succeeded, failed, already_cached, results: [{class_name, status, time_ms}]}
get_decompile_priority_list tool
Rank uncached classes by importance: Android components > app package > obfuscated > SDKs.

        Args:
            analysis_goal: Optional hint for logging (e.g. "find network APIs").
            package: App package prefix to boost own-package classes. instance_id: Target JADX instance.
        Returns:
            dict: {priority_list: [{class_name, priority, reason}], suggested_batch_size}
warm_cache tool
Manually trigger a full background cache warmup (decompile + trigram + xref graph).

        The server already auto-triggers this warmup right after a file is loaded (unless disabled
        via DELAMAIN_WARMUP_ON_START=false on the Java side). Call this tool yourself only when: the
        server was started with warmup-on-load disabled, a previous warmup was cancelled/failed and
        needs a restart, or you want to redo it with a different skip_libraries setting. Calling it
        while a warmup is already running is a no-op / returns the current run's state (it does not
        start a second overlapping pass). No busy-check: starts immediately and returns; poll
        progress with get_warmup_status().

        Args:
            skip_libraries: Skip known third-party SDK packages (android.*, kotlin.*, etc.) to warm
                only app-owned classes. Default True.
            instance_id: Target JADX instance name.
        Returns:
            dict: {started, total_classes, skipped_libraries, message}
get_warmup_status tool
Poll progress of the background cache warmup (auto-started on file load, or via warm_cache()).

        Use this to decide what you can do RIGHT NOW vs what you must still wait for — check
        `capabilities` first, then use `eta_seconds`/`eta_basis` if you need to wait.

        Returns:
            dict:
            - phase: current warmup stage name, one of ENGINE_INIT | PHASE1_DECOMPILE | PHASE2_INDEX |
              PHASE3_GRAPH | PHASE4_USEPLACES | FAST_RESTORE | DONE | IDLE | CANCELLED | ERROR.
            - running: whether the Phase-1..4 warmup pipeline is actively running right now.
            - total / processed / failed: Phase-1 decompile counters (classes queued / done / errored).
            - skipped_libraries: classes excluded because skip_libraries=True was used to start warmup.
            - percentage: Phase-1 decompile-only completion, 0-100 (processed/total). NOT the overall
              warmup progress — use overall_progress_pct for that.
            - elapsed_seconds: seconds since this warmup run started (or total run time if finished).
            - trigram_build_running: whether the in-memory trigram index is currently being built.
            - trigram_count: number of trigram entries built so far (0 if using the mmap shard index
              instead — see capabilities.code_search for the authoritative readiness signal).
            - trigram_skip_reason: present only if trigram build was skipped, e.g. "low-heap"; absent
              (key missing) otherwise.
            - use_places_ready: whether the precise xref-with-snippet index has finished its one-time
              harvest.
            - use_places_harvest_running / use_places_harvest_processed / use_places_harvest_total:
              background harvest progress for precise cross-reference snippets (runs after core
              warmup finishes; does not block other capabilities).
            - use_places_skip_reason: present only if the harvest was skipped, e.g. "low-heap"; absent
              (key missing) otherwise.
            - warming_up: single boolean = "is anything still warming" (core pipeline OR the
              use-places harvest). False means everything below has settled into its final state.
            - overall_progress_pct: 0-100 blended progress across ALL phases (decompile + trigram +
              graph + use-places harvest), weighted by each phase's typical cost share. This is the
              number to show a human/progress bar — percentage above is only Phase-1.
            - eta_seconds: rough estimate of seconds remaining until warmup fully settles (null while
              there isn't enough data yet, e.g. right at the start of a phase). Extrapolated from
              elapsed time and current progress rate, not a hard guarantee.
            - eta_basis: what eta_seconds was computed from — "overall-progress-rate" (normal
              extrapolation from Phase-1..3 progress), "fast-restore-estimate" (hot-start path
              restoring from existing cache), "useplaces-harvest" (core warmup done, only the
              background snippet harvest remains), "starting" (just began, no rate yet), "idle"
              (nothing running), or "done".
            - capabilities: dict mapping capability name -> readiness string. Check this BEFORE
              calling the corresponding tool:
                - "ready": safe to use now.
                - "warming": still being built; the corresponding tool call may be slow, return
                  partial results, or should be retried later.
                - "skipped:low-heap": permanently unavailable this run because the host doesn't have
                  enough heap; do not poll waiting for "ready" — it will never arrive.
              Keys:
                - metadata_search: class/method name and structure search. Ready as soon as the APK
                  is loaded (does not depend on warmup).
                - class_source: decompiled Java source lookup (get_class_source). Ready
                  quickly — served from cache once warm, falls back to lazy live-decompile before that.
                - smali: smali disassembly lookup. Same readiness story as class_source.
                - live_decompile: on-demand decompilation of an arbitrary class. "warming" until the
                  one-time JADX engine init completes (a real cost paid once, ~13s on a large APK);
                  after that, individual live-decompile calls are fast.
                - code_search: full-text/regex search over decompiled code bodies
                  (search_in='code' on the search tool). Do NOT issue search_in='code' calls while
                  this is not "ready" — results will be empty or incomplete, not just slow. If this
                  is "skipped:low-heap", code-body search is unavailable for the whole session; use
                  metadata_search (name/structure) instead.
                - xref_class_level: class-level cross-reference graph (who calls/uses this class).
                  "warming" until the usage graph index finishes building.
                - precise_xref_snippets: cross-references with exact call-site source snippets (as
                  opposed to class-level-only). "warming" while the one-time use-places harvest is
                  still running; falls back to a slower live lookup path in the meantime, so calls
                  don't fail, they're just not instant.
            - effective_decompile_workers: number of parallel decompile worker threads this warmup
              run is actually using. Higher = warmup finishes faster (more CPU/heap spent now);
              use this to sanity-check why a run is faster/slower than expected on a given host.
            - decompile_workers_source: where effective_decompile_workers came from — "auto" (sized
              automatically from available heap and CPU cores) or "override" (pinned by the
              DELAMAIN_WARMUP_DECOMPILE_WORKERS environment variable, ignoring auto-sizing). Useful
              for spotting an operator-imposed speed limit vs. a hardware-limited one.
decompile_with_mode tool
Re-decompile a single class in an explicit mode — a temporary, non-persistent fallback view.

        Use this when the normal (RESTRUCTURE) output from get_class_source is garbled, partial, or
        fails to decompile cleanly (check decompile-diag first) — retry it here in SIMPLE or FALLBACK
        mode to get a usable, if less readable, view instead. This applies to ONE class only, and the
        result is NOT cached and NOT persisted: get_class_source keeps returning the normal
        RESTRUCTURE output for this class afterward — call this again each time you need the
        alternate-mode view.

        Args:
            class_name: Fully qualified class name.
            mode: RESTRUCTURE|SIMPLE|FALLBACK (default FALLBACK — skips the restructuring pipeline
                that most often produces garbled output on obfuscated/complex control flow).
            comments_level: Optional JADX CommentsLevel name, applied only for this call.
            chunk: Pagination for large responses (0 = first chunk), same semantics as get_class_source.
            instance_id: Target JADX instance name.
        Returns:
            dict: {response, mode, class_name, raw_class, ephemeral: true, note}
get_index_stats tool
Internal index health snapshot (name indices, shard index, trigram index, snapshot cache).

        Use this to decide whether code-search (search_in='code') is available, or whether to
        stick to metadata (class/method/field name) searches.

        The primary signal is shard_index (mmap'd, sharded RoaringBitmap index):
          - shard_index.built == true and shard_index.covered_classes > 0 → code-search is
            viable. Coverage is decoupled from heap size — this works even on low-memory
            instances where the old heap-resident index never got there.
          - shard_index not yet built → prefer metadata searches until it finishes.
        trigram_index is now a residual/self-heal layer (library classes + rename recovery
        cache), not the coverage signal for code-search — its saturation_percent can stay low
        or even 0% on low-memory setups while shard_index is fully covered and code-search
        works normally.
        index_prebaked reports whether a pre-baked index volume was loaded at startup (see
        docs/prebaked-index.md); index_prebaked.complete/reason explain partial or missing loads.
        Even with full coverage, broad/common search terms return partial_results (see
        search_info.broad_term in code-search results) instead of exhaustively scanning.

        CODE SEARCH HARD LIMITS — never use search_in='code' for: hex strings ≥8 chars (AES
        keys, hashes, device IDs), UUID/random-looking alphanumeric tokens, base64 blobs, or
        long URL paths ("/api/v1/some/deep/path"). These either live in native libs (invisible
        to JADX) or in classes excluded from the shard index due to size — use search_in=
        'class'/'method' to find the owning class, then get_class_source() on it instead.

        xref_readiness decides how to call xref tools: xref_readiness.class_level == "ready"
        means class-level xref (who references class X) is instant. xref_readiness.
        precise_snippets != "ready" means the precise, snippet-level harvest is still building
        (or was skipped) — do NOT request include_snippet=true against a high-fanin class while
        it says "building"/"skipped", since that falls through to a live per-caller re-decompile
        and can be slow; prefer class-level xref first, or wait for precise_snippets == "ready".

        Args:
            instance_id: Target JADX instance; omit for default.
        Returns:
            dict: {name_indices: {class_name_buckets, method_name_buckets,
                                  field_name_buckets, raw_name_map_size, index_ready},
                   shard_index: {built, covered_classes, ...},
                   trigram_index: {enabled, indexed_classes, trigram_count, max_trigrams,
                                   max_class_size_bytes, estimated_memory_mb,
                                   saturation_percent},
                   index_prebaked: {complete, reason},
                   xref_readiness: {class_level: "ready"|"building",
                                     precise_snippets: "ready"|"building"|"skipped",
                                     live_fallback_cost: str (present when precise_snippets != "ready")},
                   snapshot_cache: {method_snapshot_classes, field_snapshot_classes},
                   code_cache: {class_index_size, delegates_to_jadx_icodecache}}
get_decompile_diag tool
Authoritative decompilation-health diagnostic for one class — call this whenever
        get_class_source's output looks suspicious (truncated, garbled, oddly short, or the
        response carries decompile_quality != "ok").

        Unlike a naive text scan, every signal here comes from JADX's own internal ClassNode
        state, so it cannot be fooled by ordinary comments that merely look like warnings.

        Returns:
            dict: {
              process_state: str, process_complete: bool,  # did decompilation actually finish
              decompile_mode_override: str|None, is_fallback_mode: bool,  # JADX force-downgraded to a simpler pass
              jadx_error_count: int, jadx_errors: [{message, cause}],  # hard per-class failures
              jadx_comment_count: int, jadx_comments_by_level: {...},  # internal JADX diagnostics
              source_available_for_scan: bool,
              source_warning_markers: {...},  # best-effort text markers; SUPPLEMENTARY ONLY —
                                                # never authoritative on their own; jadx_error_count /
                                                # is_fallback_mode / process_complete are ground truth
              alternative_views: {smali_endpoint, source_endpoint}
            }

        Next steps when this reports trouble:
            - jadx_error_count > 0 or process_complete == false → decompilation genuinely failed;
              call get_smali_of_class for the raw Dalvik bytecode instead.
            - is_fallback_mode == true → readable but possibly structurally incomplete; cross-check
              against get_smali_of_class, or call decompile_with_mode to retry in another mode.

        Args:
            class_name: Fully qualified class name. instance_id: Target JADX instance name.
get_memory_diagnostics tool
Heap/RSS snapshot AFTER forcing a garbage collection — the honest memory figure.

        get_decompile_status().memory reports live heap usage, which includes garbage not yet
        collected and so overstates what delamain actually needs. Use this instead when the
        question is "how much memory does this APK really cost" (capacity planning, deciding a
        container size, or checking whether memory grew after a heavy operation).

        Reading the result:
          - heap.used_mb (with gc.ran == true) — the clean steady state: live objects only.
          - heap.freed_mb — how much of the earlier figure was collectable garbage.
          - heap.committed_mb vs process.rss_mb — what the JVM took from the OS vs what the host
            sees. The mmap'd shard index counts in RSS but never in the heap, so rss > committed
            is normal; rss far above committed with a small used_mb means the JVM is sitting on
            memory it no longer needs.
          - container.memory_limit_mb — the cgroup limit the startup heap sizing was derived from
            (null = the container has no limit set, so it can use the whole host).

        Args:
            gc: Collect before measuring (default true). Pass false for a pure observation —
                cheaper, but the number then includes uncollected garbage.
            instance_id: Target JADX instance; omit for default.
        Returns:
            dict: {gc: {ran, elapsed_ms},
                   heap: {max_mb, committed_mb, used_mb, usage_percentage,
                          used_before_gc_mb, freed_mb},   # last two only when gc ran
                   process: {rss_mb, virtual_mb},          # null off Linux
                   container: {memory_limit_mb},           # null when unlimited/unreadable
                   consumers: {trigram_count, trigram_indexed_classes, shard_index_built}}
generate_apk_digest tool
Generate a pre-analysis digest: file info, manifest, SDK detection, obfuscation assessment, entry points.

        For APK/AAR/DEX files, also includes enhanced metadata when available:
        - signing_certificates: [{subject, sha256, algorithm, valid_from, valid_until}]
        - native_libraries: [{path, abi, name}]
        - dex_count: int

        Args:
            instance_id: Target JADX instance name.
        Returns:
            dict: {file_type, package_name, class_stats, detected_sdks, obfuscation_level,
                   analysis_tips, signing_certificates (APK only), native_libraries (APK only)}
export_analysis_report tool
Export annotations, bookmarks, and tags as a formatted report.

        Args:
            format: markdown|json|sarif. include_annotations/bookmarks/tags: Toggle sections.
            instance_id: Target JADX instance name.
        Returns:
            dict: {format, report: str, stats: {annotations, bookmarks, tags}, generated_at}
list_available_files_tool tool
List APK/JAR/AAR/DEX files available in the JADX sandbox. Use before load_file.

        Args:
            subdir: Optional sub-path to scope listing. pattern: Glob like "*.apk" (default "*").
            recursive: Recurse into subdirs. instance_id: Target JADX instance.
        Returns:
            dict: {root, files: [{path, size_bytes, extension, loadable}], count}
load_file_tool tool
Load an APK/JAR/AAR/DEX into JADX without touching the GUI. Returns immediately (202).

        Loading is async, and index warmup starts automatically after it. The response carries a
        warmup snapshot (phase, eta_seconds, capabilities) plus _ai_instruction — read them instead
        of guessing when to start work:
          - poll get_decompile_status until the class tree is loaded;
          - metadata search (search_in='class'/'method'/'field'), get_class_source and smali are
            usable from that moment;
          - poll get_warmup_status and wait for capabilities.code_search == "ready" before any
            search_in='code' or high-fan-in xref call. Issuing those during warmup is the slowest
            possible timing: the content index does not exist yet and warmup owns the CPU.

        Args:
            path: Sandbox-relative path (e.g. "target.apk"). mode: replace|append.
            instance_id: Target JADX instance.
        Returns:
            dict: {dispatched: bool, mode, path, ready: false, poll_with: "get_decompile_status",
                   auto_warmup: bool, warmup_status_endpoint,
                   warmup: {phase, eta_seconds, capabilities}, _ai_instruction}
generate_frida_hook tool
Generate a ready-to-run Frida hook script with overload support. Omit method_name to use all_methods.

        Args:
            class_name: Fully qualified class name. method_name: Method name (optional).
            hook_type: method_enter|method_exit|both|constructor|all_methods (default: both).
            instance_id: Target JADX instance name.
        Returns:
            dict: {script: str, class_name, method_name, hook_type}
generate_frida_trace tool
Generate a Frida tracing script that logs all method calls on a class with args and return values.

        Args:
            class_name: Fully qualified class name. include_subclasses: Also trace direct subclasses.
            instance_id: Target JADX instance name.
        Returns:
            dict: {script: str, class_name, include_subclasses}
generate_frida_enum tool
Generate a Frida script to enumerate class instances, static fields, and enum constants at runtime.

        Args:
            class_name: Fully qualified class name. instance_id: Target JADX instance name.
        Returns:
            dict: {script: str, class_name}
jadx_init tool
Return this gateway's tool version and the running jadx version, for a client-side compatibility check.
rename_variable_tool tool
Rename a local variable inside a method using JADX SSA tracking.

        Args:
            class_name: Fully qualified class name. method_name: Method name.
            variable_name: Current variable name. new_name: New name.
            reg: Register number (disambiguation). ssa: SSA version (disambiguation).
            instance_id: Target JADX instance name.
        Returns:
            dict: {result: str} on success or {error: str, status: 404} if not found.
export_rename_mappings_tool tool
Export all rename mappings (classes, methods, fields) from the current JADX session.

        Args:
            instance_id: Target JADX instance name.
        Returns:
            dict: {mappings: [{type, original_name, new_name, class_context}], total: int}
import_rename_mappings_tool tool
Batch-apply rename mappings (same format as export_rename_mappings output).

        Args:
            mappings: List of {type, original_name, new_name, class_context} dicts.
            instance_id: Target JADX instance name.
        Returns:
            dict: {success: bool, total: int, applied: int, failed: int, errors: [str]}
rename tool
Unified rename for classes, methods, fields, and packages. Triggers 30s cache cooldown.

        Args:
            target_type: class|method|field|package. old_name: Current name. new_name: New name.
            class_name: Required for method/field. method_signature: JVM descriptor for overloads.
            dry_run: Preview without renaming. instance_id: Target JADX instance name.
        Returns:
            dict: {success: bool, message: str} or dry_run: {target_exists: bool, target_info: {...}}
apply_proguard_mapping_tool tool
Apply a ProGuard/R8 mapping.txt to batch-rename all obfuscated classes at once.

        Args:
            mapping_content: Complete contents of a ProGuard/R8 mapping.txt file.
            instance_id: Target JADX instance name.
        Returns:
            dict: {applied: int, failed: int, errors: [str], total: int, format: str}
get_android_manifest tool
Retrieve AndroidManifest.xml content. Auto-chunked if >8KB.

        Args:
            chunk: 0=first, N=continue chunked response. instance_id: Target JADX instance name.
        Returns:
            dict: {content: str, _chunking: {...}} — call again with chunk=N if has_more=true.
get_strings tool
Get APK strings. Modes: summary (default)|list|search (needs query)|get (needs key).

        Args:
            mode: summary|list|search|get. query: Keyword for search. key: Key name for get.
            locale: e.g. "values", "values-en". offset/limit: Pagination. instance_id: Target JADX instance name.
        Returns:
            dict: Mode-dependent; summary={total_strings, sample_keys}, search={matches: [{key, value}]}
get_all_resource_file_names tool
List all resource file paths (layouts, drawables, etc.) with pagination.

        Args:
            offset: Pagination start. count: Max results (0=all). instance_id: Target JADX instance name.
        Returns:
            dict: {files: [str, ...], total: int, has_more: bool}
get_resource_file tool
Fetch resource file content by path. Auto-chunked if >8KB.

        Args:
            resource_name: Path like 'res/layout/activity_main.xml'. chunk: 0=first, N=continue.
            instance_id: Target JADX instance name.
        Returns:
            dict: {content: str, _chunking: {...}} — call again with chunk=N if has_more=true.
get_file_info tool
Get file type, class count, and recommended tools for the loaded APK/JAR. Call first when starting analysis.

        Args:
            instance_id: Target JADX instance name (use list_jadx_instances to find instance names).
        Returns:
            dict: {file_type, class_count, android_features, recommended_tools, apk_package, ...}
get_config_strings tool
Get config strings: APK=strings.xml info, JAR=.properties files with search/get.

        Args:
            mode: summary|search|get|all. query: Search keyword. key: Property key.
            file: Filter by .properties filename (JAR only). instance_id: Target JADX instance name.
        Returns:
            dict: {source_type: android_strings|java_properties, ...}
get_package_classes tool
Get classes by package prefix for APK or JAR. Use auto=true to detect main package from manifest.

        Args:
            package: Package prefix. auto: Auto-detect main package. include_inner: Include inner classes.
            offset/count: Pagination (max 500). instance_id: Target JADX instance name.
        Returns:
            dict: {package: str, classes: [{name, is_inner}], total_matched, has_more}
jar_get_manifest tool
Read META-INF/MANIFEST.MF from JAR: Main-Class, Implementation-Title/Version, Spring Boot attrs.

        Args:
            instance_id: Target JADX instance name.
        Returns:
            dict: {main_class, implementation_title, all_attributes} or NOT_APPLICABLE for APK.
jar_get_services tool
Read META-INF/services/* from JAR to discover SPI service providers (JDBC, logging, etc.).

        Args:
            instance_id: Target JADX instance name.
        Returns:
            dict: {services: [{interface, implementations, count}]} or NOT_APPLICABLE for APK.
jar_get_entry_points tool
Discover entry points in JAR: Main-Class, Spring Boot Start-Class, main() methods.

        Args:
            instance_id: Target JADX instance name.
        Returns:
            dict: {primary_entry: str, entry_points: [{type, class, priority}]} or NOT_APPLICABLE.
jar_get_dependencies tool
Analyze JAR dependencies: Maven pom.properties, MANIFEST Class-Path, Spring Boot BOOT-INF/lib.

        Args:
            instance_id: Target JADX instance name.
        Returns:
            dict: {group_id, artifact_id, version, dependencies: [{name, version, source}]} or NOT_APPLICABLE.
jar_get_bytecode tool
Get bytecode/class structure (javap-style) for APK or JAR classes.

        Args:
            class_name: Fully qualified class name. instance_id: Target JADX instance name.
        Returns:
            dict: {bytecode: str, field_count, method_count, file_type}
list_resources_by_type tool
List APK resource files, either as a type-distribution summary or filtered by type.

        Without resource_type: returns total_files + a type_distribution histogram (layout,
        drawable, values, xml, raw, menu, anim, color, mipmap, font, ...).
        With resource_type: returns the paginated list of file paths under that type
        (matches "res/<type>/..." and qualified variants like "res/<type>-v21/...").

        Args:
            resource_type: Filter e.g. "layout", "drawable", "values" (omit for summary).
            offset/limit: Pagination when resource_type is set (limit capped at 500).
            instance_id: Target JADX instance name.
        Returns:
            dict: Summary={type_distribution, total_files} or
            {files: [str, ...], total, offset, limit, has_more} when filtered.
get_decoded_resource tool
Fetch the decoded text content of a resource file (e.g. binary XML layouts decoded
        to readable XML). Auto-chunked if >8KB. Use list_resources_by_type to discover file
        names first.

        Args:
            file_name: Resource path, e.g. "res/layout/activity_main.xml". chunk: 0=first,
            N=continue chunked response. instance_id: Target JADX instance name.
        Returns:
            dict: {content: str, file_name, resource_type, source, _chunking: {...}} — call
            again with chunk=N if has_more=true. 404-style {status: "not_found"} if undecodable.
resolve_resource_id tool
Resolve Android resource IDs to names and vice versa (resources.arsc lookup).

        Pass exactly one of resource_id/name; passing neither lists all id<->name mappings
        (paginated). resource_id accepts hex ("0x7f0a0000") or decimal ("2131361792"); name is
        matched as a substring against "<type>/<key>" (e.g. "layout/activity_main").

        Args:
            resource_id: Hex or decimal resource ID to resolve to a name.
            name: Substring to search for among resource names (returns matches, capped by limit).
            offset/limit: Pagination for the list-all mode (limit capped at 1000).
            instance_id: Target JADX instance name.
        Returns:
            dict: id->name: {found, type_name, key_name, full_name, id_hex, id_decimal}.
            name->id: {matches: [...], count}. list-all: {entries: [...], total, has_more}.
get_method_by_name tool
Fetch source code of a specific method. Use method_signature (JVM descriptor) to pick an overload.

        Args:
            class_name: Fully qualified class name. method_name: Method name.
            method_signature: JVM short descriptor, e.g. 'process(Ljava/lang/String;I)Z' (optional).
            instance_id: Target JADX instance name.
        Returns:
            dict: {code: str} or {available_descriptors: [...]} if overloads exist.
get_method_source tool
Get decompiled source for a single method, including line numbers and import list.

        Preferred over get_class_source when you need one specific method — avoids loading
        the entire class (which can be thousands of lines for large APKs).

        Args:
            class_name: Fully qualified class name.
            method_name: Method name (deobfuscated or raw).
            method_signature: JVM short descriptor to disambiguate overloads, e.g.
                'process(Ljava/lang/String;I)Z' (optional). Required when multiple
                overloads exist.
            instance_id: Target JADX instance name.
        Returns:
            dict: {class_name, method_name, raw_method_name, frida_overload,
                   start_line, end_line, imports, source}
            On multiple overloads without method_signature: returns HTTP 300 with
            available_descriptors list (same behaviour as get_method_by_name).
            start_line/end_line are -1 when line info is unavailable (class not
            yet decompiled or JADX metadata missing).
get_smali_of_method tool
Extract one method's Dalvik smali block from its class — the smali counterpart of
        get_method_source. Avoids binary-searching chunked get_smali_of_class output (100K+
        chars / ~19 chunks for an obfuscated class) to locate one method's bytecode by hand.

        Args:
            class_name: Fully qualified class name.
            method_name: Method name (deobfuscated or raw). Use '<init>'/'<clinit>' for
                constructors/static initializers.
            method_signature: Descriptor to disambiguate overloads — either the shortId form
                'onCreate(Landroid/os/Bundle;)V' (same values as available_descriptors from
                other method endpoints) or just the '(args)ret' portion (optional).
            instance_id: Target JADX instance name.
        Returns:
            dict: single match: {class_name, raw_class_name, method_name, descriptor, smali,
            overload_count: 1}. Multiple overloads without method_signature: {overload_count,
            matches: [{descriptor, smali}], hint}. No match: 404 with available_descriptors.
batch_get_method_by_name tool
Fetch multiple method sources in one request using "class:method" format. Auto size-managed.

        Args:
            methods: List of "class_name:method_name" strings (~16 per call; more trips
                BATCH_TOO_LARGE — either paginate with chunk or pass force=True). chunk: 0=first, N=continue.
            force: Bypass size guard. instance_id: Target JADX instance name.
        Returns:
            dict: {methods: [{class_name, method_name, code, found}]} or BATCH_TOO_LARGE error.
search_classes_by_keyword tool
Search classes by keyword. Default searches class/method/field names (fast, <100ms).

        search_in options:
        - 'class,method,field' (default) — metadata-only, always fast, no lock needed
        - 'code' — mmap shard index search inside source; call get_index_stats() first and check
          shard_index.built/covered_classes for availability. Broad/common terms return
          partial_results (search_info.broad_term=true + candidate_count/hint) instead of an
          exhaustive scan — narrow the term or use search_in='class'/'method' instead of retrying.

        Content-scan admission control (a code/comment search NEVER runs unbounded):
        - search_info.content_scan_skipped=true → no content index could prefilter this query
          (index still warming, or a regex/comment query no index can prefilter), so the content
          phase was skipped in milliseconds instead of timing out at 60s. Metadata matches in the
          same result are complete. Follow search_info.hint: retry once get_index_stats reports
          capabilities.code_search=ready, or switch to search_in='class'/'method'/'field'.
        - search_info.content_scan_sampled=true → the term was too broad, so only
          search_info.content_scanned classes were content-scanned; metadata matches are complete.

        Hard limits (hex/UUID/base64/long paths → never indexed): see get_index_stats docstring.

        For code/comment search on large APKs, prefer submit_code_search (async, no timeout risk).

        Args:
            search_term: Keyword. package: Package filter (recommended to reduce noise).
            exclude: Comma-separated package prefixes to exclude.
            search_in: 'class,method,field' (default) | 'code' | 'comment' | any combination.
            match_mode: substring (default)|exact|prefix|regex. count: Max results (default 20).
            instance_id: Target JADX instance name.
        Returns:
            dict: {classes: [...], total: int, has_more: bool}
get_method_signature tool
Get structured method signatures with Frida-compatible types and frida_overload strings.

        Args:
            class_name: Fully qualified class name. method_name: Method name.
            instance_id: Target JADX instance name.
        Returns:
            dict: {signatures: [{return_type, parameters, frida_overload, ...}], overloads: int}
get_method_callees tool
Get methods called by the specified method (pattern-based callee analysis).

        Args:
            class_name: Fully qualified class name. method_name: Method name.
            instance_id: Target JADX instance name.
        Returns:
            dict: {callees: [str, ...], callees_count: int}
search_native_methods tool
Find all native (JNI) methods across the APK — reads DEX metadata, no decompilation needed.

        Args:
            package: Optional package filter. offset: Pagination start.
            count: Max results (max 200, default 50). instance_id: Target JADX instance name.
        Returns:
            dict: {native_methods: [{class_name, method_name, param_types_frida}], has_more: bool}
submit_code_search tool
Submit a background code/comment search. Returns a ticket ID immediately — no timeout risk.

        Preferred over search_classes_by_keyword(search_in='code') for large APKs (>10k classes).

        Async workflow:
        1. ticket = submit_code_search(search_term, package=...).ticket
        2. Wait retry_after_seconds (usually 3-10s), then:
        3. result = get_code_search_result(ticket) — repeat until status="done"
        4. result.classes contains matching classes; paginate with offset=

        Hard limits (hex/UUID/base64/long paths → never indexed): see get_index_stats docstring.
        Broad/common terms return partial_results (search_info.broad_term=true) instead of an
        exhaustive scan — narrow the term or use search_in='class'/'method' rather than retrying.
        search_info.content_scan_skipped=true means no content index could prefilter the query yet
        (see search_info.hint): retry once get_index_stats reports capabilities.code_search=ready,
        or use a metadata search now — do not re-submit the same code search in a tight loop.

        Args:
            search_term: Short human-readable token (≤20 chars ideal). package: Package filter.
            search_in: code (default) | comment. match_mode: substring|exact|prefix|regex.
            instance_id: Target JADX instance name.
        Returns:
            dict: {ticket, status: "submitted"|"done", retry_after_seconds}
get_code_search_result tool
Poll the result of a code search submitted via submit_code_search().

        Args:
            ticket: Ticket ID from submit_code_search(). offset: Pagination start. count: Max results.
            instance_id: Target JADX instance name.
        Returns:
            dict: status="running" (poll again) | status="done" + classes list | status="timed_out"|"cancelled"|"not_found"
run_security_scan tool
Automated security scan for hardcoded secrets, weak crypto, insecure network, dangerous APIs.

        Args:
            scan_type: full|secrets|crypto|network|permissions. package: Scope filter.
            instance_id: Target JADX instance name.
        Returns:
            dict: {summary: {total_findings, high_severity, medium_severity}, findings: [{rule_id, severity, matches}]}
save_analysis_session tool
Save AI analysis context to a local JSON file for later restoration.

        Args:
            session_name: Name (alphanumeric, hyphens, underscores; 1-100 chars).
            context: Dict with keys: analyzed_classes, findings, notes, current_focus, next_steps.
            instance_id: Target JADX instance name.
        Returns:
            dict: {success, session_name, saved_at, file_path}
load_analysis_session tool
Load a previously saved analysis session to restore context.

        Args:
            session_name: Session name to load.
        Returns:
            dict: {metadata: {saved_at, file_info}, context: {...}} or SESSION_NOT_FOUND error.
list_analysis_sessions tool
List all saved analysis sessions with names, save times, and notes previews.

        Returns:
            dict: {sessions: [{session_name, saved_at, file_type, notes_preview}], count}
search_string_literals tool
Search for string constants (URL, API key, SQL, etc.) embedded in DEX bytecode.

        This tool scans Java/Kotlin string literals compiled directly into the
        DEX — NOT Android resource strings from strings.xml (use get_strings for those).

        IMPORTANT COVERAGE LIMITATION: By default, only already-decompiled classes are
        scanned. If coverage_pct in the response is low (e.g. < 80%), an empty result
        does NOT mean the string is absent — it may simply not be decompiled yet.
        Check coverage_note in the response for details.

        To get complete coverage for a specific package, use class_filter + force_decompile=True.
        force_decompile requires class_filter to prevent full-APK decompilation.

        Typical use cases:
        - Find hardcoded API endpoints:       pattern="https://api.", regex=False
        - Find potential API keys/secrets:    pattern="[A-Za-z0-9]{32,}", regex=True
        - Complete scan of a package:         class_filter="com.example.auth", force_decompile=True

        Args:
            pattern: String to search for, or a regex pattern when regex=True.
            regex: When True, treat pattern as a Java regular expression (default False).
            min_length: Skip string literals shorter than this (default 8).
            class_filter: Restrict to classes whose fully-qualified name contains this substring.
                          Required when force_decompile=True.
            limit: Maximum results to return (default 100, max 200 server-side).
            force_decompile: When True, trigger decompilation of undecompiled classes in the
                             filtered set (requires class_filter). Slower but ensures complete
                             coverage of the target package (default False).
            instance_id: Target JADX instance name.
        Returns:
            dict: {
                results: [{class_name: str, literal: str, line_number: int}],
                total: int, truncated: bool,
                scanned_classes: int,  # classes actually searched
                total_classes: int,    # total classes in APK
                coverage_pct: int,     # scanned / total * 100
                coverage_note: str,    # human-readable coverage assessment
                cached_percentage_at_scan: int  # % already decompiled at scan time
            }
submit_security_scan tool
Submit a security scan as a background task. Returns a ticket immediately.

        Args:
            scan_type: full|secrets|crypto|network|permissions.
            package: Optional package filter to narrow scope.
            instance_id: Target JADX instance name.
        Returns:
            dict: {ticket, status:"submitted", retry_after_seconds:5}
submit_callgraph tool
Submit a call graph export as a background task. Returns a ticket immediately.

        Args:
            class_name: Fully qualified class name (e.g. "com.example.MyClass").
            method_name: Method name to trace.
            depth: Traversal depth 1-6 (default 3).
            output_format: "json" or "dot".
            instance_id: Target JADX instance name.
        Returns:
            dict: {ticket, status:"submitted", retry_after_seconds:5}
get_task_result tool
Poll the result of a submitted background task.

        Args:
            ticket: Ticket string returned by submit_security_scan or submit_callgraph.
        Returns:
            dict: {status:"running"|"done"|"error"|"not_found", result?}
                  When status="running", retry after retry_after_seconds.
create_transfer_token tool
Create a one-time upload token so the user can PUT an APK/JAR/AAR/DEX file
        directly to the JADX sandbox, out of the AI context (bytes never pass through
        this conversation).

        upload_url always points at **this gateway's own address** (default port 8651,
        which proxies PUT /transfer/upload and GET /transfer/status through to the Java
        backend on localhost:8650) — never at the Java backend directly, since it is
        not reachable from outside the fused container. The host is resolved in
        priority order: the JADX_TRANSFER_PUBLIC_URL env var > [server]
        transfer_public_url in the gateway TOML > this gateway process's own bind
        host:port. Set JADX_TRANSFER_PUBLIC_URL (or the TOML equivalent) when the
        gateway's bind address (e.g. 0.0.0.0) is not itself a reachable hostname/IP
        from the machine that will run the upload.

        Workflow:
          1. Call this tool with the destination filename (and size_bytes if known, for
             an upfront cap check).
          2. Tell the user to run: `delamain-cli --upload-url <upload_url> --token <token> <local-file>`
          3. Once the upload responds with {"status": "complete", "path": ...}, call
             load_file(path=<filename>) to load it into JADX.
             (Resume-on-stall mechanics and the raw curl equivalent: get_jadx_guide(verbose=True).)

        Args:
            filename: Destination file name — a plain basename, no path separators.
            size_bytes: Optional total size in bytes, used for an upfront cap check
                (rejected with an error if it exceeds the server's configured max).
            instance_id: Target JADX instance.
        Returns:
            dict: {token, filename, upload_path, status_path, expires_at_epoch_ms,
                   max_bytes, chunk_size_hint, upload_url} on success — or
                   {..., upload_url_hint} instead of upload_url when no
                   externally-reachable address is configured for this instance.
analyze_apk_tool tool
Load an APK/JAR into the JADX backend with smart routing.

        strategy="auto" (default): load if the backend is free; return "ambiguous"
          when it already has a file loaded (human guidance needed).
        strategy="replace": load, replacing whatever is currently open.
        strategy="new_instance": no-op in this single-backend gateway — returns
          all_busy pointing at replace/append instead.
        strategy="append": append to current project (useful for dep JARs).

        Args:
            path: Sandbox-relative file path (e.g. "target.apk"). strategy: auto|replace|new_instance|append.
            instance_id: Unused — this gateway has a single fixed JADX backend.
        Returns:
            dict: {status: loaded|ambiguous|all_busy|error, instance, path, ready: false,
                   poll_with, next_steps}
list_loaded_files_tool tool
Show what APK/JAR the JADX backend is currently analyzing and whether it is free.

        Args:
            instance_id: Unused — this gateway has a single fixed JADX backend.
        Returns:
            dict: {instances: [{name, loaded_file, decompile_progress, available,
                   version_name, version_code, input_hash}], count, free_count}
get_xrefs tool
Find cross-references to a class, method, or field.

        About to call this again on a caller you just found — walking a chain one hop at a time?
        Stop: use find_callers_chain(target_class, target_method) for the whole backward chain in
        one call, or export_callgraph for a full multi-method call graph in either direction.

        Args:
            target_type: class|method|field. class_name: Fully qualified class name.
            member_name: Method or field name (required for method/field). offset/count: Pagination.
            include_snippet: If True, attach the surrounding source code snippet at each call site.
                Useful for quickly understanding usage context without opening each referencing class.
                Only the current page (offset..offset+count) is decompiled for snippets — turn the
                page to get snippets for more rows; missing snippet on a row is not a missing
                reference. For a high-fan-in target where you just need presence/count, leave this
                False and paginate with plain rows first. Each row's 'snippet' field is null if
                retrieval failed.
            context_lines: Lines of context before/after the reference in the snippet (default: 3).
                Only used when include_snippet=True.
            instance_id: Target JADX instance name.
        Returns:
            dict: {references: [{class, raw_class, method, raw_method, from_method, raw_from_method,
                source_line[, decompiled_line, code_snippet, snippet]}], pagination: {total, offset,
                limit, count, has_more, ...}, resolution, via, distinct_referrer_class_count[, hint]}.

                resolution/via describe how the result was computed and its row granularity:
                - "class-level"/"usage-graph" (target_type=class, include_snippet=False): one row
                  per distinct referrer class, no line numbers. Fastest, no caller decompile.
                - "precise"/"use-places-store" (target_type=class, include_snippet=True, index warm):
                  one row per call site (exact line), from a persisted index — instant.
                - "live-method-level"/"live-decompile": fast indices missing or incomplete; computed
                  by live-decompiling each referrer. Mixed granularity — a row per call site where a
                  precise position was resolvable, else per referencing method, else per class.
                - "method-level"/"use-graph" (target_type=method, include_snippet=False): one row per
                  distinct caller method, no line numbers.
                - target_type=field never sets resolution/via (always live, method-level rows).

                pagination.total counts rows in the CHOSEN granularity, so it can legitimately differ
                across include_snippet values for the same target (e.g. 3 with include_snippet=False
                vs 4 with include_snippet=True) without any reference being lost — that's class-level
                dedup vs per-call-site rows, not a bug. distinct_referrer_class_count is the number of
                distinct referrer classes across the FULL result regardless of row granularity, so you
                can confirm the underlying referrer set is unchanged even when the row count differs.

                On a live-decompile path (resolution="live-method-level"), a 25s server-side deadline
                may cut the scan short: the result then carries partial_results=true and partial_reason
                explaining the cutoff and what to do (warmup, narrower target, or submit_xref for the
                deadline-free async path). Don't treat a partial result as "this target has no more
                referrers" — re-check partial_reason before drawing that conclusion.
batch_get_xrefs tool
Fetch xrefs for multiple targets in one request (max 10). Format: "type:class[:member]".

        Args:
            targets: e.g. ["class:com.example.Foo", "method:com.example.Bar:myMethod"]. Max 10.
            instance_id: Target JADX instance name.
        Returns:
            dict: {results: [{target, found, xrefs_count, xrefs: [{class, raw_class, method,
                raw_method, from_method, raw_from_method, source_line[, decompiled_line,
                code_snippet]}], distinct_referrer_class_count, resolution, via}
                | {target, found: false, error}], total: int}. No pagination — always full lists.

                Same resolution/via/distinct_referrer_class_count semantics as get_xrefs (see its
                docstring) — always precise/per-call-site granularity, never the class-level dedup
                get_xrefs(include_snippet=False) uses, so xrefs_count and distinct_referrer_class_count
                can legitimately differ; both are correct.

                Same 25s live-decompile deadline as get_xrefs: a cut-short scan sets partial_results=true
                and partial_reason on the response — follow its suggestion (warmup, fewer targets, or
                submit_xref) rather than assuming the target has no more referrers.
submit_xref tool
Submit a background xref resolution. Returns a ticket immediately — no 120s timeout risk.

        Prefer this over get_xrefs / batch_get_xrefs on large APKs, or whenever include_snippet=True
        is needed and the class's referrers haven't been decompiled yet (the sync endpoints fall back
        to a full live decompile of every caller, which can hit the 120s HTTP timeout on big APKs).

        Two mutually exclusive request shapes:
        - single target: target_type=class|method|field, class_name, member_name (method/field name).
        - batch: targets=["class:com.example.Foo", "method:com.example.Bar:myMethod"] (max 10) — same
          format as batch_get_xrefs. When targets is given, target_type/class_name are ignored.

        Async workflow:
        1. ticket = submit_xref(target_type="class", class_name=...).ticket
        2. Wait retry_after_seconds, then:
        3. result = get_xref_result(ticket) — repeat until status="done"
        If the underlying precomputed index is already warm, this returns status="done" on the very
        first call (no polling needed) — check status before polling.

        Args:
            target_type: class|method|field (single-target mode; ignored if targets is set).
            class_name: Fully qualified class name (single-target mode).
            member_name: Method or field name (required for target_type=method|field).
            targets: Batch mode target list, format "type:class[:member]" (max 10).
            include_snippet: Attach surrounding source at each call site (single-target mode only).
                Snippets are generated for at most the first 200 references (ASYNC_SNIPPET_CAP);
                rows beyond that cap have no 'snippet' field even though the reference itself is
                still present in the result — absence there means "not decompiled", not "not found".
            context_lines: Snippet context lines (default 3, only used with include_snippet=True).
            instance_id: Target JADX instance name.
        Returns:
            dict: {ticket, status: "submitted"|"done", retry_after_seconds}. Never contains the
                references themselves, even when status="done" — always follow up with
                get_xref_result(ticket) to fetch the data (retry_after_seconds is 0 in that case,
                so it's safe to call immediately without waiting).
get_xref_result tool
Poll the result of an xref resolution submitted via submit_xref().

        Args:
            ticket: Ticket ID from submit_xref(). offset/count: Pagination over the reference list
                (single-target mode only — batch results aren't paginated, same as batch_get_xrefs).
            instance_id: Target JADX instance name.
        Returns:
            dict: status="running" (poll again, see retry_after_seconds) |
                  status="done" — single-target mode: {references: [...], pagination: {total, offset,
                  limit, count, has_more, ...}, resolution, via, distinct_referrer_class_count[, hint]}
                  (same field meanings as get_xrefs — see its docstring for what resolution/via/
                  distinct_referrer_class_count mean and why row counts can differ by granularity);
                  batch mode: {results: [...], total} (same shape as batch_get_xrefs, unpaginated) |
                  status="not_found" (ticket expired, or target class/method/field doesn't exist —
                  check message) | status="error" (check message)

What we checked

The same checks run on every server. Each line below has one of these marks:

FoundA published issue such as a risky tool or a CVE
PassedWe ran the check on this server and found nothing
After reviewChecked; we publish it once a person verifies it
Partly tracedRan, but the scanner could not follow every path to its end
FactWhat the code does, not a judgement either way
Not checkedThe scanner had nothing to read for it, or it needs the live server
Code Safetypartly traced
  • 8 checks: command injection, argument injection, path traversal, server-side request forgery, SQL injection, code execution, unsafe deserialization, template injection
    Checked on every scan. Results in this category are published only after a person has verified them.
Capability Exposure8.9
  • Runs programs the caller chooses
    No tool runs a command or program the caller supplies — 88 tool handlers traced. Not every path could be followed, so this is not a clean pass.
  • Executes caller-supplied code
    No tool evaluates code the caller supplies — 88 tool handlers traced. Not every path could be followed, so this is not a clean pass.
  • Reads or writes any file path
    No tool works on a file path the caller supplies without a root check — 88 tool handlers traced. Not every path could be followed, so this is not a clean pass.
  • Requests any address
    No tool sends a request to an address the caller supplies — 88 tool handlers traced. Not every path could be followed, so this is not a clean pass.
  • Runs caller-supplied SQL
    No tool executes a query the caller supplies — 88 tool handlers traced. Not every path could be followed, so this is not a clean pass.
  • Tools that start processes
    Not seen in the traced code of 88 capabilities; 87 more call code the scanner could not follow, where it may happen
  • Tools that touch files
    Not seen in the traced code of 88 capabilities; 87 more call code the scanner could not follow, where it may happen
  • Tools that call the network
    23 of 88 capabilities call the network; 64 more call code the scanner could not follow, where it may happen
Where the code is: 88 handlers in 22 files at commit f89f07f73adf
Prompt Integrity8.5
  • 5 checks: tool poisoning, instruction override, hidden content, exfiltration requests, metadata integrity
    Checked on every scan. Results in this category are published only after a person has verified them.
Supply Chain2.8
  • Dependency manifests
    3 manifests: gateway/pyproject.toml, pom.xml, tools/delamain-cli/Cargo.toml
  • Lockfiles checked against OSV
    2 files resolved and checked against the OSV database; 1 not resolved: gateway/pyproject.toml: dependency ranges declared here were not resolved against a lockfile and were not checked
  • Known vulnerabilities in production dependencies CRITICAL
    12 production packages with known advisories
  • Known vulnerabilities in other dependencies
    No package used only for development, tests or examples has a known advisory
  • MCP SDK version
    fastmcp ==3.4.4, mcp >=1.30.0,<2
Secrets & Credentials10.0
  • 3 checks: credential harvesting, undeclared credential access, credentials sent over the network
    Checked on every scan. Results in this category are published only after a person has verified them.
  • Tools that read credentials
    Not seen in the traced code of 88 capabilities; 87 more call code the scanner could not follow, where it may happen
  • Environment variables
    1 capability reads environment variables (often API keys)
  • Authentication declared
    Not checked: needs the live server's tools/list (a remote server declares how clients authenticate)
Behavior Transparency10.0
  • 3 checks: undeclared network access, undeclared file access, undeclared process execution
    Checked on every scan. Results in this category are published only after a person has verified them.
  • Tool descriptions present
    Every tool has a description the model and the user can read
  • Statically known names
    Every tool's name could be read from the code
  • Input schemas
    Not checked: needs the live server's tools/list (every tool declares an input schema)
  • Destructive tools annotated
    Not checked: needs the live server's tools/list (tools that write, delete or run commands carry destructivehint)

Dependencies with known vulnerabilities (12 in production)

Dependency ranges were not resolved against a lockfile, so the score is capped at 7.

PackageInstalledWorstAdvisoriesFixed in
authlibPyPI 1.7.2 CRITICAL 16 advisories 1.8.01.9.01.9.1
  • CRITICALGHSA-6v38-4h7w-rj9h CVE-2026-96760Authlib: empty signatures validation in JWS JSON deserialization
  • HIGHGHSA-7vr2-2fgp-9w7p CVE-2026-114615 PYSEC-2026-4355Authlib incomplete algorithm-confusion fix permits HMAC forgery with prefixed public keys
  • HIGHGHSA-c73q-w75p-j82v CVE-2026-116672Authlib RFC 7592 examples omit registration-access-token client binding
  • HIGHGHSA-8m4g-j4wp-wgcg CVE-2026-114616 PYSEC-2026-4356Authlib accepts an empty HMAC key, allowing JWS/JWT signature forgery (HS256/HS384/HS512)
  • MEDIUMPYSEC-2026-4359 CVE-2026-114619 GHSA-q686-2qmg-hqc7Authlib is a Python library which builds OAuth and OpenID Connect servers. Prior to 1.9.0, OpenIDImplicitGrant.validate_authorization_request() checks the client-controlled raw request.payload.scope for openid after the parent grant has filtered allowed scopes into request.scope. A registered client permitted an ID token response type but not the openid scope can add openid to the request, obtain user consent, and receive a signed ID token containing the user's subject and allowed profile claims. Authorization code flow and deployments that allow openid for every client permitted an ID token response are not affected. In authlib/oidc/core/grants/implicit.py, OpenIDImplicitGrant.validate_authorization_request() checks request.payload.scope instead of the filtered request.scope. This issue is fixed in version 1.9.0.
  • MEDIUMPYSEC-2026-4360 CVE-2026-114620 GHSA-x4rv-c3wx-4cr8Authlib is a Python library which builds OAuth and OpenID Connect servers. Prior to 1.9.0, Authlib's RFC 9101 JWTAuthenticationRequest passes the unauthenticated, client-controlled request_uri parameter to the abstract get_request_object() hook before applying a destination or registration policy; the hook itself performs no network request, while the documentation demonstrates an unrestricted HTTP fetch. In deployments whose integrator implements that hook as an unrestricted outbound fetch, a remote attacker who knows a valid public client identifier can make the authorization server request internal, link-local, or otherwise unintended URLs and can distinguish fetch outcomes through different error responses and timing. Deployments whose custom hook already applies a secure allowlist, destination controls, and retrieval limits are not affected. The JWTAuthenticationRequest implementation in authlib/oauth2/rfc9101/authorization_server.py forwards request_uri to get_request_object() before an application-approved retrieval policy accepts the destination. This issue is fixed in version 1.9.0.
  • MEDIUMGHSA-fch4-3c6x-j4gc CVE-2026-114618 PYSEC-2026-4358Authlib: Default JWT bearer grant accepts assertions for the wrong audience
  • MEDIUMGHSA-x4rv-c3wx-4cr8 CVE-2026-114620 PYSEC-2026-4360Authlib: Unvalidated request_uri fetch in JWT-secured authorization request (JAR) leading to SSRF
  • MEDIUMPYSEC-2026-4357 CVE-2026-114617 GHSA-c5mf-xmp2-59rcAuthlib is a Python library which builds OAuth and OpenID Connect servers. Prior to 1.9.0, OpenIDMixin.parse_id_token() reads the nonce_supported decision from the untrusted ID token being validated and sets the expected nonce to null when that claim is the JSON boolean false. In implicit and hybrid relying parties, or applications that directly accept externally supplied ID tokens, an attacker with a captured validly signed token can bypass the nonce-to-session binding and replay the victim's token into an attacker-controlled session. Plain authorization code flow is not affected, and the token must still pass signature, issuer, and audience validation. OpenIDMixin.parse_id_token() trusts nonce_supported in both authlib/integrations/base_client/sync_openid.py and authlib/integrations/base_client/async_openid.py to disable the expected nonce. This issue is fixed in version 1.9.0.
  • MEDIUMGHSA-c5mf-xmp2-59rc CVE-2026-114617 PYSEC-2026-4357Authlib: ID token can disable its own nonce validation via the nonce_supported claim
  • MEDIUMPYSEC-2026-4354 CVE-2026-114614 GHSA-jj7h-c3hg-m23xAuthlib is a Python library which builds OAuth and OpenID Connect servers. From 0.13 until 1.8.0, authlib.common.security.is_secure_transport() uses a textual prefix comparison for loopback HTTP exemptions, so a URL whose userinfo begins with a loopback host can be accepted even when its parsed host is an external non-loopback system. An external party able to supply a URL to OIDC RP-Initiated Logout registration, authorization-server metadata validation, or another call site can bypass the TLS-required guard and cause cleartext redirection or acceptance of cleartext endpoints. The issue does not bypass redirect URI exact matching and does not by itself forge tokens or authenticate users. The vulnerable authlib.common.security.is_secure_transport() implementation in authlib/common/security.py misinterprets the userinfo component before OIDC RP-Initiated Logout dynamic client registration and other consumers enforce transport security. This issue is fixed in version 1.8.0.
  • MEDIUMPYSEC-2026-4355 CVE-2026-114615 GHSA-7vr2-2fgp-9w7pAuthlib is a Python library which builds OAuth and OpenID Connect servers. From 1.3.1 until 1.9.0, OctKey.import_key() checks asymmetric-key markers only at byte zero while Authlib's PEM loaders accept leading whitespace, comments, or a byte-order mark. In deployments that use the documented mixed algorithm registry and already configure verification with PEM or certificate bytes containing such a prefix, an unauthenticated attacker who knows those same public-key bytes can use them as an HMAC secret and forge HS256 tokens with arbitrary identity or authorization claims. This is a bypass of the remediation for CVE-2024-37568. The module-level jwt object reaches OctKey.import_key() in authlib/jose/rfc7518/oct_key.py, where POSSIBLE_UNSAFE_KEYS fails to identify prefixed asymmetric key material. This issue is fixed in version 1.9.0.
  • MEDIUMPYSEC-2026-4358 CVE-2026-114618 GHSA-fch4-3c6x-j4gcAuthlib is a Python library which builds OAuth and OpenID Connect servers. Prior to 1.9.0, the default RFC 7523 JWTBearerGrant.get_audiences() returns an empty list, causing JWTBearerGrant.verify_claims() to require only that an aud claim exists without matching the current authorization server. An attacker holding a legitimate assertion for another service can present it to a server that shares the signing key and uses the default grant, obtaining an access token across a trust boundary. Implementations that override get_audiences() with the server's valid audience identifiers are not affected. This issue is fixed in version 1.9.0.
  • MEDIUMGHSA-q686-2qmg-hqc7 CVE-2026-114619 PYSEC-2026-4359Authlib: OpenID implicit grant checks raw scope instead of allowed scope before issuing ID tokens
  • MEDIUMPYSEC-2026-4356 CVE-2026-114616 GHSA-8m4g-j4wp-wgcgAuthlib is a Python library which builds OAuth and OpenID Connect servers. Prior to 1.9.1, Authlib's OctKey.import_key() and HMAC signing and verification path accept zero-length key material. If an application's secret lookup can return an empty string or empty bytes, a remote attacker can compute the deterministic HS256, HS384, or HS512 signature for arbitrary token claims and have Authlib treat the token as authentic. This issue is fixed in version 1.9.1.
  • LOWGHSA-jj7h-c3hg-m23x CVE-2026-114614 PYSEC-2026-4354Authlib: is_secure_transport() loopback exemption can be bypassed with a userinfo component, allowing cleartext-HTTP URLs to non-loopback hosts
certifiPyPI 2026.6.17 CRITICAL 2 advisories 2026.10.18
  • CRITICALGHSA-6q48-6c7w-9gw2 PYSEC-2026-4320certifi bundles emSign root CAs with compromised intermediate CA keys
  • MEDIUMPYSEC-2026-4320 GHSA-6q48-6c7w-9gw2certifi bundles emSign root CAs with compromised intermediate CA keys
dnspythonPyPI 2.8.0 HIGH 2 advisories 2.9.02.9.2
joserfcPyPI 1.7.4 HIGH 2 advisories 1.7.51.7.6
  • HIGHGHSA-jpxq-7h8p-2q76 CVE-2026-119283joserfc: Unbounded JWE General JSON `recipients` Array Leads to CPU Exhaustion (DoS) via Repeated RSA Private-Key Decryption
  • MEDIUMGHSA-9pg5-8c7x-5hfx CVE-2026-119284joserfc: Compact JWS size guard allocates attacker-controlled segments before rejection
opentelemetry-apiPyPI 1.44.0 MEDIUM 2 advisories 1.45.11.45.2
  • MEDIUMGHSA-mf5v-w3w3-f6cg CVE-2026-126360OpenTelemetry Python API: Denial of service through quadratic-time traceparent parsing
  • MEDIUMGHSA-xcq7-p3pf-p88h CVE-2026-114603OpenTelemetry Python: Unbounded tracestate parsing in opentelemetry-api
quinn-protocrates.io 0.11.18 MEDIUM 2 advisories 0.11.19
  • MEDIUMRUSTSEC-2026-0524 GHSA-wppq-2f6r-wfvmLong Retry token can panic or exhaust memory in a QUIC client
  • MEDIUMRUSTSEC-2026-0523 GHSA-53rm-773f-4q8cMAX_STREAM_DATA frame can open streams beyond the stream limit
fastmcpPyPI 3.4.4 MEDIUM 1 advisory 3.4.104.1.2
  • MEDIUMGHSA-7xgj-8392-5q4rFastMCP: Post-transform component authorization is skipped on direct calls
fastmcp-slimPyPI 3.4.4 MEDIUM 1 advisory 3.4.104.1.2
  • MEDIUMGHSA-7xgj-8392-5q4rFastMCP: Post-transform component authorization is skipped on direct calls
number_prefixcrates.io 0.4.0 MEDIUM 1 advisory no fix yet
quinn-udpcrates.io 0.5.15 MEDIUM 1 advisory 0.5.160.6.3
  • MEDIUMRUSTSEC-2026-0538 GHSA-6pp4-4cxf-xf88Receive loop can spin after a truncated datagram
tokiocrates.io 1.53.1 MEDIUM 1 advisory 1.51.61.53.3
urlcrates.io 2.5.8 MEDIUM 1 advisory 2.5.9
  • MEDIUMRUSTSEC-2026-0592 GHSA-hrj5-67jp-wqp9Stack overflow in `Url::origin()` on nested `blob:` URLs

Past security advisories

Vulnerabilities published for this server itself, from the GitHub Advisory Database.

No security advisories have been published for this server in the GitHub Advisory Database.

How it runs

Where it runsOn your machine, started by your MCP client from this repository or its package
Transportnot stated in the code the scanner read; most local servers talk over stdio
Sign-innot checked needs the live server
MCP SDKfastmcp ==3.4.4, mcp >=1.30.0,<2
Servers in the code1 (Delamain Gateway)

The project's own security

Security policynone no SECURITY.md in the repository: report issues privately through GitHub if it is enabled
Past advisoriesnone in the GitHub Advisory Database
Last push2026-11-02
Signed releasesnot checked yet

Where it is published

Listed in1 catalog (github_search)
LicenseApache-2.0
Created2026-07-21
Topicsai ai-agents android android-security apk decompiler frida jadx mcp mcp-server

Attack map

How the server is built and where its risky tools lead: servers, their tools, what the tools' code can do, and the traced route from a declared risky tool's argument to the operation it reaches. Click a node for details.

Request a scan or an audit

Tell us about your server. We reply within 5 working days.

What do you need? *

We use these details only to answer you.