Skip to main content
Glama
sqlscope-mcp

sqlscope-mcp

by 0xmortuex

find_in_db

Read-onlyIdempotent

Search a SQLite database for a string or number across all non-BLOB columns. Returns matching rows, columns, and snippets, with per-table time and match limits to prevent long scans.

Instructions

Find where a string or number appears anywhere in the database: a substring search over every non-BLOB column of every ordinary table (virtual and shadow tables are skipped). Returns, per table, the matching rows (rowid or primary key), the column and a snippet around the match. Each table has a time budget and a match cap, so a huge database cannot hang the call; tables that ran out of budget are listed.

case_sensitive: default false (SQLite folds ASCII letters only, so Turkish or other non-ASCII letters match case-sensitively). max_matches_per_table: 1-50. seconds_per_table: 0.1-30.

Input Schema

NameRequiredDescriptionDefault
pathYes
termYes
case_sensitiveNo
seconds_per_tableNo
max_matches_per_tableNo

Output Schema

NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.1/5.0
Behavior4/5

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

Annotations already declare readOnly/idempotent/non-destructive, so the description focuses on what annotations can't convey: substring matching semantics, BLOB column exclusion, virtual/shadow table skipping, per-table time budget and match cap, and the fact that budget-exhausted tables are reported. That is meaningful behavioral context beyond structured fields. It stops short of describing result ordering or how snippets are truncated.

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

Conciseness4/5

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

Front-loaded with the core behavior, then scoping caveats, then the return shape, then a terse per-parameter block. Every sentence contributes facts an agent needs. Minor cost: the parameter lines are stripped list fragments rather than sentences, and the snippet/return detail slightly overlaps the output schema.

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

Completeness4/5

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

For a five-parameter search tool whose annotations already establish safety, this covers matching rules, table scope, resource guards, budget-exhaustion reporting, and parameter bounds. The one real gap is that the required `path` parameter is never described, which matters for an agent constructing the call. Return values are briefly summarized even though an output schema exists, which is acceptable rather than wasteful.

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 0% schema description coverage the description carries the full burden, and it delivers for three of five parameters: `case_sensitive` gets the crucial SQLite ASCII-only folding caveat (non-ASCII letters match case-sensitively), and `max_matches_per_table` and `seconds_per_table` get explicit bounds (1-50, 0.1-30). `term` is implicitly defined as the string or number being searched, but `path` is never explained, leaving one required parameter undocumented anywhere.

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 ('Find where a string or number appears anywhere in the database') and immediately narrows the scope: substring search over every non-BLOB column of every ordinary table, skipping virtual and shadow tables. That precision distinguishes it from the sibling `query` tool, which does arbitrary SQL, without needing to name it.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The phrase 'appears anywhere in the database' implies the use case (you don't know which table/column holds a value), and the explicit skip of virtual/shadow tables implies a limit. But it never states when to prefer `query` or `describe_table` instead, nor any exclusions or prerequisites. Usage is inferable rather than directed.

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