scry-mcp
v0.21.1Marker-indexed SQL cache MCP server
These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.
scry_sql
Execute a read-only SQL query against the scry project database. Use this to discover project state, search docs, check coverage, inspect anchors. Supports SELECT and WITH (CTE) queries only. All mutator keywords (INSERT, UPDATE, DELETE, DROP, etc.) are blocked. Key tables: scry__doc — knowledge graph entries (@scry.entry markers) columns: id, kind, status, weight, summary, rationale, applies, current_path, ephemeral, missing_since, content_hash, extras (JSON1; NULL whe…
| Parameter | Type | Description |
|---|---|---|
query * | string |
scry_mint
REQUIRED before writing any @scry.* marker. Generates a collision-free ID and returns the marker schema with per-field instructions. Follow the returned instructions exactly when filling fields. Also performs collision detection and returns warnings alongside the ID: tier1_collisions — markers with the SAME prefix already in the DB. If any tier-1 hit is the same logical concept, ABANDON the new ID and reference the existing marker instead — stranded IDs pollute scry. tier2_neighbors — markers in the same kind+first-segment family (inform…
| Parameter | Type | Description |
|---|---|---|
kind * | string | |
prefix * | string |
scry_mint_with_check
PREFERRED over raw scry_mint. Generates a collision-free scry marker ID (same as scry_mint) and augments the response with existing-marker warnings: Tier 1 — exact-prefix collision: markers with the same prefix already in scry__doc. If any tier-1 hit is the same logical concept, ABANDON the new ID and reference the existing marker instead — stranded IDs pollute scry. Tier 2 — family-slug neighbors: related markers in the same slug family (informational; may reveal related prior work to link against). Args: kind: 'entry', 'anchor', or…
| Parameter | Type | Description |
|---|---|---|
kind * | string | |
prefix * | string |
scry_surface
Rebuild the DB from disk markers. Use after git pull, bulk file moves, or if query results seem stale. The file watcher handles live indexing — only call this for full re-scans. Walks all project files, parses @scry.* markers, upserts to DB. Idempotent. Uses content-hash dedup. Args: force: If true, hard-deletes records whose files no longer exist — both soft-deleted docs and orphaned file-body rows (so scry_grep stops returning deleted files). Reported via force_deleted and body_pruned. If false (default), sets…
| Parameter | Type | Description |
|---|---|---|
force | boolean | |
path |
scry_sink
Lower the index back to disk-only state. The DB forgets; the disk remembers. Truncates all scry index tables (scry__doc, scry__anchor, scry__bind, scry__rel, scry__file, scry__warning, and join tables) in a single atomic transaction. Schema is preserved; FTS tables update via existing triggers. Disk markers are never modified. Requires protocol-level user confirmation via MCP elicitation before executing — the operation will not proceed if the confirmation is declined, cancelled, or unavailable. Args: then_surface: If True, immediately runs scry_su…
| Parameter | Type | Description |
|---|---|---|
then_surface | boolean |
scry_scrub
Create a clean PR branch with all @scry.* markers stripped. By default, files inside agent/** and any AGENT.md are excluded from scrubbing — their markers are left intact. Only tracked files outside the agent workspace are cleaned. This matches the common workflow: agent/ is gitignored (or excluded via .git/info/exclude), so only the tracked source files need clean markers for PR submission. Set include_agent=true to restore the prior behavior: scrub everything and remove the agent/ directory entirely. Creates {branch}--clean from current HEAD. Does not sta…
| Parameter | Type | Description |
|---|---|---|
include_agent | boolean |
scry_script
Run validation or transformation scripts with DB access. Actions: list — discover available scripts (bundled + project-local) run — execute a named script Args: action: "list" or "run" script: script name (required for action="run") params: arbitrary params passed to the script (optional) Scripts have read-write DB access. They return structured JSON.
| Parameter | Type | Description |
|---|---|---|
action * | string | |
params | ||
script |
scry_grep
Full-text search over all indexed file bodies (scry__file_fts). Complements scry_sql: use this when you want broad full-text search across file content, not just curated marker fields. Returns one hit per file (highest BM25-ranked match). Args: query: FTS5 query string — plain words, phrases ("foo bar"), boolean (foo AND bar, foo OR bar, NOT foo). Accepts standard FTS5 syntax. kind: Optional: filter to files whose associated doc has this kind (e.g. 'design', 'lesson', 'pattern'). Files withou…
| Parameter | Type | Description |
|---|---|---|
query * | string | |
kind | ||
limit | integer | |
path_glob | ||
status |
scry_db_health
Probe the scry project database and report health. Designed for substrate code (e.g. reflection's `wake.py` auto-restore loop) that needs to distinguish actual corruption from transient WAL write-lock contention. The same scry-mcp connection primitives are used as for every other tool — long `busy_timeout`, WAL journal mode, retry semantics — so a healthy-but-busy DB will not be reported as corrupt. Returns JSON with these fields: status "ok" | "corrupt" | "locked" integrity result of `PRAGMA integrity_check` (string), or null…