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.

NuGet

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

NameIdPolicyDescription
List Databasesdata.list_databasesReadLists the known app databases that can be inspected.
Describe Schemadata.describe_schemaReadReturns schema metadata for a database or table.
Query Databasedata.queryReadExecutes a constrained read query against an app database.

List Databases

Arguments:

  • includeSystemStores: include cache and system-store databases
  • maxResults: maximum number of matches

Returns:

  • databases
  • truncated
  • capturedAtUtc

Example:

{
  "toolId": "data.list_databases",
  "arguments": {
    "includeSystemStores": false,
    "maxResults": 100
  }
}

Describe Schema

Arguments:

  • path: required absolute or sandbox-relative database path
  • database: alternate field name for the same path
  • table: optional table filter

Returns:

  • databasePath
  • tables
  • capturedAtUtc

Example:

{
  "toolId": "data.describe_schema",
  "arguments": {
    "path": "my-app.db",
    "table": "users"
  }
}

Query Database

Arguments:

  • path: required absolute or sandbox-relative database path
  • database: alternate field name for the same path
  • sql: required read-only SQL statement
  • maxRows: maximum rows to return, default 100

Returns:

  • databasePath
  • sql
  • columns
  • columnMetadata
  • rows
  • rowValues
  • truncated
  • capturedAtUtc

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
  }
}