Skip to main content
Glama

Inspect Sqlite Database

inspect_sqlite_database
Idempotent

Inspect a local offline SQLite snapshot and sibling WAL read-only to return SHA-256 evidence, schema inventory, and controlled selected-table row samples without arbitrary SQL.

Instructions

Inspect an explicit local SQLite database snapshot and its existing sibling WAL without modifying source files or opening a native analysis provider. Requires Node.js 24.x >=24.15 or 26+ with native DatabaseSync.limits support, checked by the worker. Returns observed Evidence with database/WAL SHA-256 and a compact schema inventory. Selecting an exact ordinary table expands only its schema and samples rows (default 20, subject to byte and worker resource limits). Select exact columns in the requested order to avoid unrelated or large values; schema_scope=database explicitly expands the whole schema; returned rows retain 64-bit integers, text bytes and blobs with explicit truncation. No arbitrary SQL, view or virtual-table execution, extension loading, database repair, encryption support or live-snapshot atomicity claim. At most two inspections per provider are admitted; occupied capacity is retryable. An isolated temporary copy and owned worker enforce input, value/record, SQL-statement, JSON-reply, JavaScript-heap and deadline limits; overall native heap is not capped. Supply a quiescent snapshot for coherent database/WAL evidence.

Input Schema

NameRequiredDescriptionDefault
pathYesAbsolute path to an offline SQLite database snapshot
tableNoExact ordinary table name; views and virtual/shadow tables are not executed
columnsNoExact row columns in caller-selected order; requires table. Omit to sample all visible columns.
row_limitNoSelected-table sample size, default 20; subject to byte and worker resource limits
schema_scopeNoDefault: compact inventory without a table, or detailed selected-table schema with a table. Database explicitly expands all stored declarations and supported columns.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.3/5.0
Behavior4/5

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

Goes well beyond the annotations: it discloses the isolated temporary copy and owned worker, integer/byte/JSON-reply/heap/deadline limits, the caveat that 'overall native heap is not capped', an admission concurrency limit of two inspections that is retryable, and a Node.js >=24.15 runtime prerequisite. It also honestly disclaims atomicity rather than overpromising. The one weak spot is that it says the operation avoids 'modifying source files' while annotations set readOnlyHint=false; because the description separately discloses the temporary-copy write, this reads as scoping rather than a genuine contradiction, though the mismatch is never reconciled for the caller.

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

Conciseness3/5

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

Front-loaded with purpose and return shape, which is correct, but the body is a single dense paragraph chaining a dozen constraints separated by semicolons. Most sentences carry real information, yet the packing makes the operative guidance (table/columns/scope) harder to extract than it should be; a bulleted or ordered layout would preserve the content with less reading cost.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a 5-parameter tool with no output schema, the description covers what is returned (Evidence with database/WAL SHA-256 and schema inventory), the sampling semantics, truncation behavior, resource limits, runtime prerequisites, and the quiescent-snapshot precondition. Nothing an agent needs in order to call it correctly appears to be missing.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

With 100% schema coverage the baseline is 3, but the description adds rationale the schema lacks: selecting columns 'in the requested order' to 'avoid unrelated or large values', and that row samples are 'subject to byte and worker resource limits'. It still restates defaults already present in the schema (row_limit 20, default inventory scope), so the gain over the schema is modest rather than decisive.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

States a specific verb and resource ('Inspect an explicit local SQLite database snapshot and its existing sibling WAL'), and the resource type alone separates it from the adb/native/archive siblings. Scope boundaries are stated up front ('without modifying source files or opening a native analysis provider').

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?

Gives usable selection rules: 'Selecting an exact ordinary table expands only its schema and samples rows', column selection to avoid large values, and 'schema_scope=database explicitly expands the whole schema'. It also states clear exclusions (no arbitrary SQL, views, extension loading, repair, encryption). It never names an alternative tool or says when to prefer one, so it stops short of a 5.

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