Skip to main content
Glama

adb_sqlite_inspect

Inspect a Room or SQLite database inside an installed Android app to list databases, view schema, or run a read-only query.

Instructions

Safely inspect a Room or SQLite database inside an installed app. Lists package databases, shows schema, or executes one validated read-only query. Requires a debuggable app (run-as) or root; queries a bounded private snapshot with device sqlite3 or an isolated host SQLite process.

Input Schema

NameRequiredDescriptionDefault
queryNoOne read-only SELECT, WITH, EXPLAIN, or allowlisted PRAGMA statement
accessNoAccess method. auto prefers run-as and falls back to root.auto
actionNoList databases, show sqlite_master schema, or run a read-only querylist
deviceNoDevice serial
maxRowsNoMaximum rows returned for SELECT/WITH queries (1-1000, default 100)
databaseNoDatabase filename inside the package databases directory (no path separators)
packageNameYesInstalled Android package whose databases directory may be inspected

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv1.1.6

TDQS

A3.8/5.0
Behavior3/5

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

With no annotations supplied, the description does most of the safety work: it says 'safely', 'read-only', 'one validated query', and that access goes through a 'bounded private snapshot' via device sqlite3 or an isolated host process. That is meaningful behavioral context. It still omits return shape and what happens when maxRows truncates results, so the description doesn't tell the agent whether returned data is complete.

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

Conciseness5/5

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

Three sentences, each carrying distinct information: purpose, capabilities, and the privilege/execution constraints. The capability list is front-loaded, ahead of the caveats, which is the right order for tool selection.

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?

For a 7-parameter read-only tool with full schema coverage and no output schema, the description covers prerequisites, execution isolation, and query validation. The one real gap is output shape (what a list/schema/query result looks like, and whether results are truncated by maxRows), but on the whole it is enough to call correctly.

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 the schema already documents every parameter including the enums and bounds. The description only reinforces the query parameter's constraint ('one validated read-only query') and doesn't explain the access or device parameters, so it adds little beyond the schema. Baseline 3 applies.

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?

The first sentence gives a specific verb ('inspect') and resource ('Room or SQLite database inside an installed app'), and the second enumerates the three concrete modes (list databases, show schema, run one read-only query). It does not explicitly contrast itself with adjacent adb tools an agent might reach for (adb_shell, adb_cat, adb_pull), so sibling differentiation is implied rather than stated.

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

Usage Guidelines4/5

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

It states a hard precondition clearly: the target app must be debuggable (run-as) or the device rooted. That tells the agent when this tool is viable, but there are no exclusions or named alternatives for the cases where those preconditions fail.

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