query_sqlite
Execute SQL queries on a SQLite database within an Android app's sandboxed data directory. Works on debuggable apps or rooted devices/emulators.
Instructions
Execute a SQL query/command on a SQLite database within an app's sandboxed data directory. Note: Only works on debuggable apps or rooted devices/emulators.
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": {
"packageName": "<packageName>",
"dbName": "<dbName>",
"query": "<query>"
},
"name": "query_sqlite"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| query | Yes | The SQL query/command to execute (e.g. 'SELECT * FROM users LIMIT 10;', '.tables', '.schema') | |
| dbName | Yes | Database filename (e.g. 'local_cache.db') or absolute path within the sandbox (e.g. '/data/data/com.example.app/databases/main.db') | |
| serial | No | Specific device serial number | |
| packageName | Yes | Package name of the target app (e.g. 'com.example.app') |