Skip to main content
Glama
croc100

litescope

Diagnose database locks

litescope_locks
Read-onlyIdempotent

Diagnose SQLite database locking issues by inspecting PRAGMA settings and live lock state. Returns a JSON report with verdict and specific changes to apply for local files, D1, or Turso.

Instructions

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.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
liveNoProbe the live lock state right now instead of static PRAGMA config (local files only)
sourceYesDatabase source: a local file path (./app.db), a Cloudflare D1 DSN (d1://DB_ID when CLOUDFLARE_API_TOKEN+CLOUDFLARE_ACCOUNT_ID are set, or d1://TOKEN@ACCOUNT_ID/DB_ID), or a Turso DSN (turso://TOKEN@ORG/DB).
Behavior5/5

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

Annotations already indicate read-only, idempotent, non-destructive. The description adds significant behavioral context: it explains the two modes (static vs live), the provider-specific guidance, and explicitly states it's read-only. It also notes that live mode only works for local files. No contradictions with annotations.

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?

The description is concise yet packed with essential information. It is well-structured: first paragraph covers the primary purpose and output, second paragraph the live mode. Every sentence adds value, and the information is front-loaded.

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?

Given no output schema, the description adequately describes the return format (JSON verdict). It covers both modes, all parameters, limitations, and provider specifics. It is complete enough for an agent to use effectively without guessing.

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

Parameters5/5

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

Schema coverage is 100%, but the description goes well beyond: for 'source', it gives concrete examples and environment variable requirements for D1 and Turso; for 'live', it clarifies its purpose and the local-files-only limitation. This adds substantial meaning that the schema alone does not convey.

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?

The description clearly states it diagnoses 'database is locked' errors and writer-starvation problems, inspects specific SQLite parameters (journal mode, busy_timeout, etc.), and returns a JSON report. It distinguishes between static config check and live lock probing, and its purpose is distinct from sibling tools like litescope_health or litescope_query.

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?

The description explicitly tells when to use the tool (for 'database is locked' SQLITE_BUSY or writer-starvation) and when to use the live flag (when actively reporting locked). It also notes that live mode is for local files only. However, it does not explicitly contrast with sibling tools, though the context implies this is the go-to for lock diagnostics.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

Latest Blog Posts

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