Verify what your app stores on the device
Inspect SQLite schemas and run read-only queries in your .NET app to investigate missing or unexpected data.
Database tools let you check the records behind an app’s behavior, such as whether a value was saved or expected records are present. Discover SQLite databases, inspect their schemas, and run constrained read-only queries inside approved app roots.
Install
dotnet add package Ansight.Tools.Database
Register the Suite
using Ansight;
using Ansight.Tools.Database;
var options = Options.CreateBuilder()
.WithDatabaseTools()
.WithReadOnlyToolAccess()
.Build();
Registration API
WithDatabaseTools(): registers the SQLite discovery, schema, and read-only query tools. No suite-specific configuration is currently required.
Specific Concerns
- The suite is SQLite-focused.
- Paths must stay inside approved sandbox roots.
- Query execution is read-only by design.
- Schema and query results can expose sensitive user or app data.
Default search roots include:
- Android:
appData,cache,temp - iOS and Mac Catalyst:
appData,documents,cache,temp
Tool Matrix
| Name | Id | Policy | Description |
|---|---|---|---|
List Databases | data.list_databases | Read | Lists the known app databases that can be inspected. |
Describe Schema | data.describe_schema | Read | Returns schema metadata for a database or table. |
Query Database | data.query | Read | Executes a constrained read query against an app database. |
List Databases
Arguments:
includeSystemStores: include cache and system-store databasesmaxResults: maximum number of matches
Returns:
databasestruncatedcapturedAtUtc
Example:
{
"toolId": "data.list_databases",
"arguments": {
"includeSystemStores": false,
"maxResults": 100
}
}
Describe Schema
Arguments:
path: required absolute or sandbox-relative database pathdatabase: alternate field name for the same pathtable: optional table filter
Returns:
databasePathtablescapturedAtUtc
Example:
{
"toolId": "data.describe_schema",
"arguments": {
"path": "my-app.db",
"table": "users"
}
}
Query Database
Arguments:
path: required absolute or sandbox-relative database pathdatabase: alternate field name for the same pathsql: required read-only SQL statementmaxRows: maximum rows to return, default100
Returns:
databasePathsqlcolumnscolumnMetadatarowsrowValuestruncatedcapturedAtUtc
rows is keyed by stable columnMetadata.key values. rowValues preserves result order and includes each cell’s runtime SQLite storage type, which is useful when duplicate column names or blob values appear in a query result.
Example:
{
"toolId": "data.query",
"arguments": {
"path": "my-app.db",
"sql": "select id, email from users order by created_at desc limit 20",
"maxRows": 20
}
}