adb_find
Search Android device files by name or glob pattern using find, with capped results and truncation reporting to keep output bounded.
Instructions
Search for files on the device by name or pattern. Uses the find command with glob matching. Results are capped at maxResults to prevent unbounded output. Reports whether results were truncated.
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": {
"name": "<name>"
},
"name": "adb_find"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| name | Yes | Filename pattern (glob: *.apk, config.*, *test*) | |
| root | No | Use root shell for system paths | |
| type | No | Filter by type: file, directory, or any | any |
| device | No | Device serial | |
| maxDepth | No | Maximum directory depth to search (1-50, default 10) | |
| maxResults | No | Maximum results to return (1-10000, default 500) | |
| searchPath | No | Starting directory for search | /sdcard |
| result_handle | No | Optional. If provided, store this tool's result under `result://<tool>/<name>` for retrieval after compaction. Name must be 1-32 chars, [a-zA-Z0-9_-]. Existing handles with the same tool+name are overwritten. Use adb_result_list to see active handles, adb_result_get or the MCP Resource URI to retrieve. | |
| result_handle_ttl | No | Optional. TTL in seconds for the result handle (60 to 604800). Default 43200 (12 hours). Ignored if result_handle is not provided. |