Skip to main content
Glama

Trace Android References

trace_android_references
Idempotent

Trace incoming static references to an exact Android class or unique method in a local APK, mapping code usage without executing the target or inferring runtime calls.

Instructions

Trace incoming static references to an exact Android class or unique method. Overloaded method reference queries are explicitly unsupported by the current engine. Source lines and DEX offsets remain unknown; no runtime calls are inferred.

Example tool call

This call uses example arguments supplied in the tool’s input schema.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "path": "/tmp/Example.apk",
      "class_name": "example.MainActivity"
    },
    "name": "trace_android_references"
  }
}

Input Schema

NameRequiredDescriptionDefault
pathYesLocal APK path; the target is never executed
class_nameYesExact fully qualified class name
method_nameNoOmit for class references; ambiguous overloaded methods are unsupported

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A3.6/5.0
Behavior4/5

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

Annotations only declare readOnlyHint=false, openWorldHint=true, idempotentHint=true, destructiveHint=false; they say nothing about output fidelity. The description adds real behavioral context: what the engine cannot resolve (overloaded methods), and that source lines, DEX offsets, and runtime calls are not produced. That negative disclosure is the most useful part of the definition, though it lacks any positive statement of result shape.

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, front-loaded with the action, then constraints, then output limits. Each sentence carries information, though the phrasing 'Source lines and DEX offsets remain unknown' is terse to the point of being slightly opaque about what is returned.

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

Completeness3/5

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

With no output schema, the description should say what a successful result contains, and it only says what the result does not contain (source lines, offsets, runtime calls). An agent knows the limits but not the payload, so it is adequate but incomplete for a tool that produces a reference set.

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 coverage is 100%, so all three parameters are already documented, including 'Omit for class references' on method_name. The description's only added meaning is the overload ambiguity constraint, which largely restates the schema. Baseline 3 applies when the schema does the heavy lifting.

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 and resource: 'Trace incoming static references to an exact Android class or unique method.' The qualifiers 'exact' and 'unique' make the operation precise. It stops short of differentiating itself from siblings such as trace_call_path or procedure_references, which an agent could easily confuse with this reference-tracing operation.

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

Usage Guidelines3/5

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

The description gives an exclusions constraint ('Overloaded method reference queries are explicitly unsupported') and the schema note says to omit method_name for class references, which implies the two modes. It never says when to pick this over trace_call_path or procedure_references, so guidance is implied rather than explicit.

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

Deploy Server

Other Tools