litescope
Server Configuration
Describes the environment variables required to run the server.
| Name | Required | Description | Default |
|---|---|---|---|
| CLOUDFLARE_API_TOKEN | No | Cloudflare API token with D1 access (only for d1:// sources) | |
| CLOUDFLARE_ACCOUNT_ID | No | Cloudflare account ID (only for d1:// sources) |
Instructions
Guidance the server publishes about itself, which clients place ahead of the tool catalog so the model reads it before choosing anything.
This server publishes no instructions, or was last inspected before Glama recorded them.
Capabilities
Features and capabilities supported by this server
Protocol revision2025-11-25
| Capability | Details |
|---|---|
| tools | {} |
| logging | {} |
| prompts | {} |
| resources | {
"subscribe": true
} |
| completions | {} |
Tools
Functions exposed to the LLM to take actions
| Name | Description |
|---|---|
| litescope_health | Inspect a SQLite or D1 database for operational faults: corruption (PRAGMA integrity check), WAL bloat from a starved checkpoint, freelist fragmentation, and reachability. Returns a JSON report with a severity (ok / warning / critical) and a list of issues. Read-only. For D1: set CLOUDFLARE_API_TOKEN + CLOUDFLARE_ACCOUNT_ID and use source=d1://DB_ID. |
| litescope_schema | Load the schema of a SQLite or D1 database — tables, columns (name, type, not-null, primary key), and indexes. Returns JSON. Read-only. Works with local files, D1, and Turso. For D1: set CLOUDFLARE_API_TOKEN + CLOUDFLARE_ACCOUNT_ID and use source=d1://DB_ID. |
| litescope_diffA | Compare two SQLite or D1 databases and return their schema and row-count differences as JSON. Works across any combination of local files, D1, and Turso — e.g. diff a local migration target against a live D1 database. Read-only. |
| litescope_migrate_plan | Plan a migration between two SQLite or D1 databases WITHOUT applying it. Returns the migration SQL plus a blast-radius analysis: each operation classified safe / risky / destructive, with an estimated write-lock duration for table rebuilds. Use this before applying any migration to a D1 database. Read-only. |
| litescope_migrate_diffA | Diff two SQLite or D1 databases and return the migration SQL that would bring the 'old' source up to the 'new' schema — without applying it or computing blast-radius. Useful when you only need the SQL to review or pass to litescope_migrate_apply. For a full blast-radius analysis use litescope_migrate_plan. Read-only. |
| litescope_queryA | Run a read-only SQL query on any SQLite or D1 database and return the results as JSON. Only SELECT statements and read-only PRAGMAs are allowed. This is the primary tool for an AI agent to explore data in a D1 database. Token budgeting: results are capped at max_rows (default 200) so a large table won't blow your context window — the response reports total_rows and truncated. Use the columns argument to project only the fields you need. Narrow with LIMIT / WHERE for precise reads. For D1: set CLOUDFLARE_API_TOKEN + CLOUDFLARE_ACCOUNT_ID and use source=d1://DB_ID. |
| litescope_adviseA | Analyze a local SQLite database for performance problems and recommend fixes: foreign keys with no index, redundant indexes, and full table scans for any supplied queries. Returns findings with runnable CREATE/DROP INDEX suggestions. Read-only — recommends, never alters the schema. (Local files only.) |
| litescope_checkA | Verify a SQLite backup. Runs a PRAGMA integrity check; if 'against' is given, also compares schema and row counts to a reference database. Returns a JSON report. Read-only. (Local files only.) |
| litescope_d1_listA | List all Cloudflare D1 databases in the account. Returns each database's UUID, name, creation date, table count, and the DSN to use with other litescope tools. Requires CLOUDFLARE_API_TOKEN and CLOUDFLARE_ACCOUNT_ID environment variables. Read-only. |
| litescope_fingerprintA | Cluster a fleet of SQLite databases by schema and report how many distinct schemas are running, with each cluster's drift from the canonical (largest) one. Reads a fleet config file (litescope.fleet.yaml). Read-only. |
| litescope_fleet_healthA | Triage operational faults across a whole fleet of SQLite databases in parallel — corruption, WAL bloat, fragmentation, reachability — sorted worst-first. Reads a fleet config file (litescope.fleet.yaml). Read-only. |
| litescope_locks | Diagnose "database is locked" / SQLITE_BUSY and writer-starvation problems — the most common SQLite production failure. Inspects journal mode, busy_timeout, locking mode, and WAL bloat for local files, and returns provider-specific guidance for D1 and Turso. Each finding includes the exact PRAGMA or DSN change to apply. Returns a JSON report with a verdict (ok / attention / critical). Set live=true (local files only) to instead probe the current lock state: whether a writer is holding the lock right now and which processes have the file open. Use this when an app is actively reporting "database is locked". Read-only. |
| litescope_snapshot_list | List point-in-time snapshots (local backups) for a local SQLite database, newest first. Snapshots are created with litescope_snapshot (requires --allow-writes). Use this to find a snapshot to restore, or to confirm a database has a backup before a risky write. Read-only; local files only. |
| litescope_autopilot | Self-driving DBA for a local SQLite database. Derives safe maintenance and optimization actions — ANALYZE, PRAGMA optimize, missing foreign-key indexes, and (when fragmented) VACUUM / redundant-index cleanup — each explained in plain language. Dry-run by default (apply=false): returns the plan without changing anything. apply=true executes the safe actions and requires --allow-writes; a snapshot is taken first so the run is one litescope_restore away from undo. Risky actions (VACUUM, dropping indexes) only run with aggressive=true. Local files only. |
Prompts
Interactive templates invoked by user choice
| Name | Description |
|---|---|
| diagnose_locked_database | Diagnose and fix a 'database is locked' / SQLITE_BUSY error. |
| review_migration | Review a SQL migration for blast radius before applying it. |
| safe_optimize | Tune a database with autopilot, reviewing the plan before applying. |
| health_checkup | Run a full operational checkup on a database and explain the findings. |
Resources
Contextual data attached and managed by the client
| Name | Description |
|---|---|
No resources | |
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/croc100/Litescope'
If you have feedback or need assistance with the MCP directory API, please join our Discord server