Skip to main content
Glama
android-reserve-mcp

android-reserve-mcp

by lonnnnnng

frida

Destructive

Attach to Android devices and processes to load instrumentation scripts, trace Java/Native/JNI/Mono calls, inspect runtime status, and manage sessions for dynamic analysis.

Instructions

明确设备的attach/spawn/load/resume/status/close;java-loaders枚举唯一selector,java-methods读取默认或显式唯一loader方法重载,trace-java需显式argumentTypes,可同agent nativeHooks按线程/调用范围关联JNI。trace-java-group用同agent多方法线程栈及JNI对象身份关联请求/回复,不按时间猜测;trace-mono实验解析Mono ARM64非泛型窄ABI方法(int32/bool/long/float/string、静态或显式instance)并回核JIT信息,需要显式允许运行时准备入口;trace-jni观测未来动态注册/撤销;Native选择symbolName或模块rva二选一,未加载模块等待时间有限且可缩短。unload只撤销本服务scriptId。

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": {
      "action": "<action>"
    },
    "name": "frida"
  }
}

Input Schema

NameRequiredDescriptionDefault
pidNo
rvaNo
actionYes
deviceIdNo
scriptIdNo
classNameNo
javaHooksNo
maxEventsNo
sessionIdNo
maxMethodsNo
methodNameNo
moduleNameNo
monoTargetNo
returnTypeNo
scriptPathNo
symbolNameNo
nativeHooksNo
objectTtlMsNo
packageNameNo
captureStackNo
moduleWaitMsNo
argumentCountNo
argumentTypesNo
argumentOffsetNo
loaderSelectorNo
maxTrackedObjectsNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed5 schema fields changedv0.5.4
    • changedInput schema / properties / action / enum
      Previous value: -[
      -  "devices",
      -  "processes",
      -  "attach",
      -  "spawn",
      -  "load",
      -  "runtime",
      -  "trace-native",
      -  "java-methods",
      -  "java-loaders",
      -  "trace-java",
      -  "trace-jni",
      -  "unload",
      -  "resume",
      -  "status",
      -  "close"
      -]New value: +[
      +  "devices",
      +  "processes",
      +  "attach",
      +  "spawn",
      +  "load",
      +  "runtime",
      +  "trace-native",
      +  "java-methods",
      +  "java-loaders",
      +  "trace-java",
      +  "trace-java-group",
      +  "trace-jni",
      +  "trace-mono",
      +  "unload",
      +  "resume",
      +  "status",
      +  "close"
      +]
    • addedInput schema / properties / javaHooks
      Added value: +{
      +  "items": {
      +    "properties": {
      +      "argumentTypes": {
      +        "items": {
      +          "maxLength": 200,
      +          "minLength": 1,
      +          "type": "string"
      +        },
      +        "maxItems": 16,
      +        "type": "array"
      +      },
      +      "captureReceiver": {
      +        "type": "boolean"
      +      },
      +      "className": {
      +        "maxLength": 512,
      +        "minLength": 1,
      +        "type": "string"
      +      },
      +      "correlation": {
      +        "properties": {
      +          "argumentIndex": {
      +            "maximum": 15,
      +            "minimum": 0,
      +            "type": "integer"
      +          },
      +          "group": {
      +            "pattern": "^[A-Za-z0-9_.-]{1,64}$",
      +            "type": "string"
      +          },
      +          "multiReply": {
      +            "type": "boolean"
      +          },
      +          "receiver": {
      +            "type": "boolean"
      +          },
      +          "role": {
      +            "enum": [
      +              "request",
      +              "reply"
      +            ],
      +            "type": "string"
      +          }
      +        },
      +        "required": [
      +          "group",
      +          "role"
      +        ],
      +        "type": "object"
      +      },
      +      "id": {
      +        "pattern": "^[A-Za-z0-9_.-]{1,64}$",
      +        "type": "string"
      +      },
      +      "methodName": {
      +        "maxLength": 200,
      +        "minLength": 1,
      +        "type": "string"
      +      },
      +      "returnType": {
      +        "maxLength": 200,
      +        "type": "string"
      +      },
      +      "valueCaptures": {
      +        "items": {
      +          "properties": {
      +            "argumentIndex": {
      +              "maximum": 15,
      +              "minimum": 0,
      +              "type": "integer"
      +            },
      +            "argumentsField": {
      +              "maxLength": 128,
      +              "minLength": 1,
      +              "type": "string"
      +            },
      +            "className": {
      +              "maxLength": 512,
      +              "minLength": 1,
      +              "type": "string"
      +            },
      +            "kind": {
      +              "const": "flutter-method-call",
      +              "type": "string"
      +            },
      +            "methodField": {
      +              "maxLength": 128,
      +              "minLength": 1,
      +              "type": "string"
      +            }
      +          },
      +          "required": [
      +            "kind",
      +            "argumentIndex"
      +          ],
      +          "type": "object"
      +        },
      +        "maxItems": 4,
      +        "type": "array"
      +      }
      +    },
      +    "required": [
      +      "id",
      +      "className",
      +      "methodName",
      +      "argumentTypes"
      +    ],
      +    "type": "object"
      +  },
      +  "maxItems": 8,
      +  "minItems": 1,
      +  "type": "array"
      +}
    • addedInput schema / properties / maxTrackedObjects
      Added value: +{
      +  "maximum": 256,
      +  "minimum": 1,
      +  "type": "integer"
      +}
    • addedInput schema / properties / monoTarget
      Added value: +{
      +  "properties": {
      +    "allowRuntimeCompile": {
      +      "const": true,
      +      "type": "boolean"
      +    },
      +    "argumentTypes": {
      +      "items": {
      +        "enum": [
      +          "int32",
      +          "bool",
      +          "long",
      +          "float",
      +          "string"
      +        ],
      +        "type": "string"
      +      },
      +      "maxItems": 4,
      +      "type": "array"
      +    },
      +    "assemblyName": {
      +      "maxLength": 240,
      +      "minLength": 1,
      +      "type": "string"
      +    },
      +    "captureReceiver": {
      +      "type": "boolean"
      +    },
      +    "className": {
      +      "maxLength": 200,
      +      "minLength": 1,
      +      "type": "string"
      +    },
      +    "instance": {
      +      "type": "boolean"
      +    },
      +    "methodName": {
      +      "maxLength": 200,
      +      "minLength": 1,
      +      "type": "string"
      +    },
      +    "namespace": {
      +      "maxLength": 240,
      +      "type": "string"
      +    },
      +    "returnType": {
      +      "enum": [
      +        "int32",
      +        "bool",
      +        "long",
      +        "float",
      +        "string"
      +      ],
      +      "type": "string"
      +    }
      +  },
      +  "required": [
      +    "assemblyName",
      +    "namespace",
      +    "className",
      +    "methodName",
      +    "argumentTypes",
      +    "returnType",
      +    "allowRuntimeCompile"
      +  ],
      +  "type": "object"
      +}
    • addedInput schema / properties / objectTtlMs
      Added value: +{
      +  "maximum": 120000,
      +  "minimum": 1000,
      +  "type": "integer"
      +}
  2. First observedv0.5.2

TDQS

B3/5.0
Behavior4/5

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

Annotations already declare destructive=true/readOnly=false, and the description adds genuine behavioral detail beyond that: unload only revokes this service's own scriptId (containing the blast radius), unloaded-module waits are bounded and can be shortened, trace-mono is experimental and requires explicit allowRuntimeCompile, and trace-java-group correlates by stack/JNI identity rather than timestamps. It does not discuss attach/spawn side effects, process restarts, or timeout failure modes, so not a 5.

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

Conciseness3/5

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

It is compact but delivered as one unbroken semicolon-delimited block with no grouping by action family, so an agent must parse dense mixed topics (device lifecycle, Java, Mono, JNI, native, unload) in a single pass. Most sentences do carry information, but the lack of structure and front-loading costs clarity.

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

Completeness2/5

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

For a destructive, 17-action, 26-parameter tool with no output schema, the description covers only part of the action surface and almost none of the parameter surface. An agent would still be guessing about devices/processes/runtime, required parameter combinations per action, and what unload/close actually tear down.

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

Parameters2/5

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

Schema description coverage is 0% across 26 parameters, so the description carries the full burden, yet it explains only a handful: argumentTypes for trace-java, loaderSelector uniqueness, symbolName vs rva, allowRuntimeCompile. Key fields such as pid, deviceId, sessionId, scriptPath, objectTtlMs, maxTrackedObjects, maxEvents, argumentCount/argumentOffset, correlation.group/role, and valueCaptures are left entirely to the bare schema.

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

Purpose3/5

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

The description names and characterizes roughly a third of the 17 actions (attach/spawn/load/resume/status/close, java-loaders, java-methods, trace-java, trace-java-group, trace-mono, trace-jni, native selection, unload), but never states the tool's overall purpose (Frida dynamic instrumentation) and says nothing about devices, processes, runtime, or spawn semantics. An agent can identify several action behaviors but not the tool's scope as a whole.

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?

There is real intra-tool routing guidance: java-loaders to enumerate a unique selector before java-methods, trace-java needs explicit argumentTypes, trace-java-group instead of guessing reply pairing by time, and Native requires symbolName XOR module rva. However, nothing tells the agent when to use this tool versus the native, script, or device siblings, and roughly half the actions get no selection criteria.

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