Skip to main content
Glama
droidasc-mcp

droidasc-mcp

by cnlnn

asc_find_refs

Read-only

Locate cross-DEX references to strings, types, methods, and fields in Android APKs, and list direct subclasses or interface implementors for a given class.

Instructions

Find cross-DEX references or direct subclasses/interface implementors.

extends/impl use an exact class in value and return direct declarations only. Optional rust_asc supports string/type/method/field only and has unverified coverage.

Tool call template

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

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

Input Schema

NameRequiredDescriptionDefault
kindYesReference category; search_members accepts method or field only
limitNoMaximum result page size in rows or source lines, server-capped
valueNoLiteral value (classes: Dalvik or dotted); exact extends/impl parent
offsetNoZero-based result offset; graph traversal requires zero
backendNoEngine; rust_asc is opt-in and reports unverified coveragedroidasc
threadsNoPositive ASC worker count; requested values above 32 are capped
apk_pathYesAPK file path within configured allowed roots
class_nameNoExact owner class; for legacy fuzzy references, a literal owner substring
fuzzy_classNoLegacy owner substring matching; exact member tools require false

Output Schema

NameRequiredDescriptionDefault
xmlNo
codeNo
kindNo
itemsNo
limitNo
totalNo
moduleNo
offsetNo
sourceNo
statusNo
backendNo
messageNo
sourcesNo
apk_pathNo
coverageNo
has_moreNo
input_idNo
truncatedNo
apk_sha256No
class_nameNo
session_idNo
limitationsNo
next_offsetNo
artifact_pathNo
artifact_sha256No
backend_versionNo
selected_modulesNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed12 schema fields changedv0.2.5
    • addedOutput schema / $defs / DexRow / properties / target_index
      Added value: +{
      +  "title": "Target Index",
      +  "type": "integer"
      +}
    • addedOutput schema / $defs / Source / properties / container_sha256
      Added value: +{
      +  "title": "Container Sha256",
      +  "type": "string"
      +}
    • addedOutput schema / $defs / Source / properties / container_size_bytes
      Added value: +{
      +  "title": "Container Size Bytes",
      +  "type": "integer"
      +}
    • addedOutput schema / $defs / Source / properties / logical_header_offset
      Added value: +{
      +  "title": "Logical Header Offset",
      +  "type": "integer"
      +}
    • addedOutput schema / $defs / Source / properties / logical_size_bytes
      Added value: +{
      +  "title": "Logical Size Bytes",
      +  "type": "integer"
      +}
    • addedOutput schema / $defs / Source / properties / module
      Added value: +{
      +  "title": "Module",
      +  "type": "string"
      +}
    • addedOutput schema / $defs / Source / properties / normalization
      Added value: +{
      +  "title": "Normalization",
      +  "type": "string"
      +}
    • addedOutput schema / $defs / Source / properties / original_dex_version
      Added value: +{
      +  "title": "Original Dex Version",
      +  "type": "string"
      +}
    • addedOutput schema / $defs / Source / properties / snapshot_entry
      Added value: +{
      +  "title": "Snapshot Entry",
      +  "type": "string"
      +}
    • addedOutput schema / $defs / Source / properties / stored_size_bytes
      Added value: +{
      +  "title": "Stored Size Bytes",
      +  "type": "integer"
      +}
    • addedOutput schema / properties / module
      Added value: +{
      +  "title": "Module",
      +  "type": "string"
      +}
    • addedOutput schema / properties / selected_modules
      Added value: +{
      +  "items": {
      +    "type": "string"
      +  },
      +  "title": "Selected Modules",
      +  "type": "array"
      +}
  2. Changed9 schema fields changedv0.2.4
    • changedInput schema / properties / limit / description
      Previous value: -"Positive result page size in rows or source lines, server-capped"New value: +"Maximum result page size in rows or source lines, server-capped"
    • removedOutput schema / $defs / DexRow / properties / instruction_offset / anyOf
      Removed value: -[
      -  {
      -    "type": "integer"
      -  },
      -  {
      -    "type": "null"
      -  }
      -]
    • addedOutput schema / $defs / DexRow / properties / instruction_offset / type
      Added value: +[
      +  "integer",
      +  "null"
      +]
    • removedOutput schema / $defs / DexRow / properties / offset_unit / anyOf
      Removed value: -[
      -  {
      -    "type": "string"
      -  },
      -  {
      -    "type": "null"
      -  }
      -]
    • addedOutput schema / $defs / DexRow / properties / offset_unit / type
      Added value: +[
      +  "string",
      +  "null"
      +]
    • removedOutput schema / $defs / DexRow / properties / target_dex_entry / anyOf
      Removed value: -[
      -  {
      -    "type": "string"
      -  },
      -  {
      -    "type": "null"
      -  }
      -]
    • addedOutput schema / $defs / DexRow / properties / target_dex_entry / type
      Added value: +[
      +  "string",
      +  "null"
      +]
    • removedOutput schema / properties / next_offset / anyOf
      Removed value: -[
      -  {
      -    "type": "integer"
      -  },
      -  {
      -    "type": "null"
      -  }
      -]
    • addedOutput schema / properties / next_offset / type
      Added value: +[
      +  "integer",
      +  "null"
      +]
  3. Changed13 schema fields changedv0.2.3
    • addedInput schema / properties / apk_path / description
      Added value: +"APK file path within configured allowed roots"
    • addedInput schema / properties / backend
      Added value: +{
      +  "default": "droidasc",
      +  "description": "Engine; rust_asc is opt-in and reports unverified coverage",
      +  "enum": [
      +    "droidasc",
      +    "rust_asc"
      +  ],
      +  "title": "Backend",
      +  "type": "string"
      +}
    • addedInput schema / properties / class_name / description
      Added value: +"Exact owner class; for legacy fuzzy references, a literal owner substring"
    • addedInput schema / properties / fuzzy_class / description
      Added value: +"Legacy owner substring matching; exact member tools require false"
    • addedInput schema / properties / kind / description
      Added value: +"Reference category; search_members accepts method or field only"
    • changedInput schema / properties / kind / enum
      Previous value: -[
      -  "string",
      -  "type",
      -  "method",
      -  "field"
      -]New value: +[
      +  "string",
      +  "type",
      +  "method",
      +  "field",
      +  "extends",
      +  "impl"
      +]
    • addedInput schema / properties / limit / description
      Added value: +"Positive result page size in rows or source lines, server-capped"
    • addedInput schema / properties / offset / description
      Added value: +"Zero-based result offset; graph traversal requires zero"
    • addedInput schema / properties / threads / description
      Added value: +"Positive ASC worker count; requested values above 32 are capped"
    • addedInput schema / properties / value / description
      Added value: +"Literal value (classes: Dalvik or dotted); exact extends/impl parent"
    • addedOutput schema / $defs
      Added value: +{
      +  "DexRow": {
      +    "additionalProperties": true,
      +    "properties": {
      +      "access": {
      +        "enum": [
      +          "read",
      +          "write"
      +        ],
      +        "title": "Access",
      +        "type": "string"
      +      },
      +      "access_flags": {
      +        "title": "Access Flags",
      +        "type": "integer"
      +      },
      +      "call_site_prototype": {
      +        "title": "Call Site Prototype",
      +        "type": "string"
      +      },
      +      "callee": {
      +        "title": "Callee",
      +        "type": "string"
      +      },
      +      "caller": {
      +        "title": "Caller",
      +        "type": "string"
      +      },
      +      "class_name": {
      +        "title": "Class Name",
      +        "type": "string"
      +      },
      +      "descriptor": {
      +        "title": "Descriptor",
      +        "type": "string"
      +      },
      +      "detail": {
      +        "title": "Detail",
      +        "type": "string"
      +      },
      +      "dex": {
      +        "title": "Dex",
      +        "type": "string"
      +      },
      +      "dex_entry": {
      +        "title": "Dex Entry",
      +        "type": "string"
      +      },
      +      "dispatch_kind": {
      +        "title": "Dispatch Kind",
      +        "type": "string"
      +      },
      +      "field_descriptor": {
      +        "title": "Field Descriptor",
      +        "type": "string"
      +      },
      +      "has_code": {
      +        "title": "Has Code",
      +        "type": "boolean"
      +      },
      +      "instruction": {
      +        "title": "Instruction",
      +        "type": "string"
      +      },
      +      "instruction_offset": {
      +        "anyOf": [
      +          {
      +            "type": "integer"
      +          },
      +          {
      +            "type": "null"
      +          }
      +        ],
      +        "title": "Instruction Offset"
      +      },
      +      "kind": {
      +        "title": "Kind",
      +        "type": "string"
      +      },
      +      "matched": {
      +        "title": "Matched",
      +        "type": "string"
      +      },
      +      "method": {
      +        "title": "Method",
      +        "type": "string"
      +      },
      +      "method_descriptor": {
      +        "title": "Method Descriptor",
      +        "type": "string"
      +      },
      +      "name": {
      +        "title": "Name",
      +        "type": "string"
      +      },
      +      "offset_unit": {
      +        "anyOf": [
      +          {
      +            "type": "string"
      +          },
      +          {
      +            "type": "null"
      +          }
      +        ],
      +        "title": "Offset Unit"
      +      },
      +      "opcode": {
      +        "title": "Opcode",
      +        "type": "string"
      +      },
      +      "parameter_types": {
      +        "items": {
      +          "type": "string"
      +        },
      +        "title": "Parameter Types",
      +        "type": "array"
      +      },
      +      "raw": {
      +        "title": "Raw",
      +        "type": "string"
      +      },
      +      "reason": {
      +        "title": "Reason",
      +        "type": "string"
      +      },
      +      "relation": {
      +        "title": "Relation",
      +        "type": "string"
      +      },
      +      "return_type": {
      +        "title": "Return Type",
      +        "type": "string"
      +      },
      +      "source": {
      +        "title": "Source",
      +        "type": "string"
      +      },
      +      "storage": {
      +        "enum": [
      +          "static",
      +          "instance"
      +        ],
      +        "title": "Storage",
      +        "type": "string"
      +      },
      +      "string": {
      +        "title": "String",
      +        "type": "string"
      +      },
      +      "string_index": {
      +        "title": "String Index",
      +        "type": "integer"
      +      },
      +      "target": {
      +        "title": "Target",
      +        "type": "string"
      +      },
      +      "target_dex_entry": {
      +        "anyOf": [
      +          {
      +            "type": "string"
      +          },
      +          {
      +            "type": "null"
      +          }
      +        ],
      +        "title": "Target Dex Entry"
      +      },
      +      "target_resolution": {
      +        "title": "Target Resolution",
      +        "type": "string"
      +      },
      +      "type_descriptor": {
      +        "title": "Type Descriptor",
      +        "type": "string"
      +      },
      +      "value": {
      +        "title": "Value",
      +        "type": "string"
      +      }
      +    },
      +    "title": "DexRow",
      +    "type": "object"
      +  },
      +  "Source": {
      +    "additionalProperties": true,
      +    "properties": {
      +      "container_entry": {
      +        "title": "Container Entry",
      +        "type": "string"
      +      },
      +      "declared_class_count": {
      +        "title": "Declared Class Count",
      +        "type": "integer"
      +      },
      +      "dex_entry": {
      +        "title": "Dex Entry",
      +        "type": "string"
      +      },
      +      "dex_version": {
      +        "title": "Dex Version",
      +        "type": "string"
      +      },
      +      "path": {
      +        "title": "Path",
      +        "type": "string"
      +      },
      +      "sha256": {
      +        "title": "Sha256",
      +        "type": "string"
      +      },
      +      "size_bytes": {
      +        "title": "Size Bytes",
      +        "type": "integer"
      +      }
      +    },
      +    "title": "Source",
      +    "type": "object"
      +  }
      +}
    • addedOutput schema / properties
      Added value: +{
      +  "apk_path": {
      +    "title": "Apk Path",
      +    "type": "string"
      +  },
      +  "apk_sha256": {
      +    "title": "Apk Sha256",
      +    "type": "string"
      +  },
      +  "artifact_path": {
      +    "title": "Artifact Path",
      +    "type": "string"
      +  },
      +  "artifact_sha256": {
      +    "title": "Artifact Sha256",
      +    "type": "string"
      +  },
      +  "backend": {
      +    "title": "Backend",
      +    "type": "string"
      +  },
      +  "backend_version": {
      +    "title": "Backend Version",
      +    "type": "string"
      +  },
      +  "class_name": {
      +    "title": "Class Name",
      +    "type": "string"
      +  },
      +  "code": {
      +    "title": "Code",
      +    "type": "string"
      +  },
      +  "coverage": {
      +    "title": "Coverage",
      +    "type": "string"
      +  },
      +  "has_more": {
      +    "title": "Has More",
      +    "type": "boolean"
      +  },
      +  "input_id": {
      +    "title": "Input Id",
      +    "type": "string"
      +  },
      +  "items": {
      +    "items": {
      +      "anyOf": [
      +        {
      +          "type": "string"
      +        },
      +        {
      +          "$ref": "#/$defs/DexRow"
      +        }
      +      ]
      +    },
      +    "title": "Items",
      +    "type": "array"
      +  },
      +  "kind": {
      +    "title": "Kind",
      +    "type": "string"
      +  },
      +  "limit": {
      +    "title": "Limit",
      +    "type": "integer"
      +  },
      +  "limitations": {
      +    "items": {
      +      "type": "string"
      +    },
      +    "title": "Limitations",
      +    "type": "array"
      +  },
      +  "message": {
      +    "title": "Message",
      +    "type": "string"
      +  },
      +  "next_offset": {
      +    "anyOf": [
      +      {
      +        "type": "integer"
      +      },
      +      {
      +        "type": "null"
      +      }
      +    ],
      +    "title": "Next Offset"
      +  },
      +  "offset": {
      +    "title": "Offset",
      +    "type": "integer"
      +  },
      +  "session_id": {
      +    "title": "Session Id",
      +    "type": "string"
      +  },
      +  "source": {
      +    "title": "Source",
      +    "type": "string"
      +  },
      +  "sources": {
      +    "items": {
      +      "$ref": "#/$defs/Source"
      +    },
      +    "title": "Sources",
      +    "type": "array"
      +  },
      +  "status": {
      +    "enum": [
      +      "ok",
      +      "partial",
      +      "error",
      +      "not_applicable"
      +    ],
      +    "title": "Status",
      +    "type": "string"
      +  },
      +  "total": {
      +    "title": "Total",
      +    "type": "integer"
      +  },
      +  "truncated": {
      +    "title": "Truncated",
      +    "type": "boolean"
      +  },
      +  "xml": {
      +    "title": "Xml",
      +    "type": "string"
      +  }
      +}
    • changedOutput schema / title
      Previous value: -"asc_find_refsDictOutput"New value: +"LegacyResult"
  4. First observedv0.1.1

TDQS

A3.7/5.0
Behavior4/5

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

Annotations already cover the safety profile (readOnly, non-destructive, closed-world), and the description adds genuine behavioral context beyond them: results are non-transitive ('direct declarations only') and the rust_asc backend has 'unverified coverage'. Pagination/offset behavior and server-side caps are left to the schema.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Three short sentences with no filler, and the core capability is front-loaded. The phrasing is telegraphic and slightly awkward ('extends/impl use an exact class in value'), which costs a point but not readability.

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

Completeness4/5

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

With an output schema present and full parameter documentation, the description only needs to convey the cross-kind behavioral differences, which it does. Minor gaps remain around graph-traversal constraints and result shape, but both are covered by schema fields.

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

Parameters3/5

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

Schema description coverage is 100%, so all nine parameters are already documented, establishing a baseline of 3. The description reinforces the `value` semantics for extends/impl and the kind restrictions on rust_asc, but largely restates what the schema already says rather than adding new constraints or formats.

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

Purpose4/5

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

States a specific verb ('Find') and two concrete resources: cross-DEX references, and direct subclasses/interface implementors. The kind semantics (extends/impl vs. member references) make it distinguishable from a plain class lister, though no sibling tool is named explicitly.

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

Usage Guidelines3/5

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

Gives useful selection rules within the tool — extends/impl take an exact class in `value` and return direct declarations only, and rust_asc is limited to string/type/method/field. It never says when to choose this over asc_list_classes or asc_get_class_source, so cross-tool routing is left to inference.

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