quarry
Server Configuration
Describes the environment variables required to run the server.
| Name | Required | Description | Default |
|---|---|---|---|
| QUARRY_ROOT | No | Base directory for all databases | ~/.punt-labs/quarry/data |
| QUARRY_API_KEY | No | Bearer token for quarry serve | (none) |
| CHUNK_MAX_CHARS | No | Max characters per chunk (~450 tokens) | 1800 |
| QUARRY_PROVIDER | No | ONNX execution provider: cpu, cuda, or unset (auto-detect) | (auto) |
| CHUNK_OVERLAP_CHARS | No | Overlap between consecutive chunks | 200 |
Instructions
Guidance the server publishes about itself, which clients place ahead of the tool catalog so the model reads it before choosing anything.
Use find before WebSearch or WebFetch for research, or before answering a why/how/what-did-we-decide question. Prefer grep for symbol and value lookups; prefer find for meaning.
Full triggers, scoping, and failure recovery: the quarry-recall (retrieve) and quarry-capture (persist) skills — the single source of truth this block points to rather than restates.
All quarry tool output is pre-formatted plain text using unicode characters for alignment. Always emit quarry output verbatim — never reformat, never convert to markdown tables, never wrap in code fences or boxes.
Capabilities
Features and capabilities supported by this server
Protocol revision2025-11-25
| Capability | Details |
|---|---|
| tools | {
"listChanged": false
} |
| prompts | {
"listChanged": false
} |
| resources | {
"subscribe": false,
"listChanged": false
} |
Tools
Functions exposed to the LLM to take actions
| Name | Description |
|---|---|
| findA | Use find before web research or answering rationale questions. Use find before WebSearch or WebFetch for research, or before answering a why/how/what-did-we-decide question. Prefer grep for symbol and value lookups; prefer find for meaning. Combines vector similarity and BM25 full-text search via Reciprocal Rank Fusion (RRF) for better recall on both meaning and exact terms. Args: query: Natural language search query. limit: Maximum number of results (default 10, max 50). document_filter: Optional exact document name to filter by. collection: Optional collection name to search within. page_type: Optional content type filter (text, code, spreadsheet, etc.). source_format: Optional source format filter (.pdf, .py, .xlsx, etc.). agent_handle: Your own handle to recall only your memories (e.g. "rmh"); leave empty to search everything. memory_type: Optional memory type filter (fact, observation, lesson, etc.). Returns: Ranked excerpts with document, page, collection, and relevance metadata; an empty result report means no indexed content matched. Input refusals, daemon errors, and unexpected failures return Error: ... text. Connection failures include recovery guidance. |
| ingestA | Use when you have a URL to add to the knowledge base. Use when you have a URL to add to the knowledge base — a doc, an article, a spec. remember = a specific durable fact, ingest = a URL, learn = a distilled lesson that gets retrieval preference. Fetches a URL with smart sitemap discovery and single-page fallback. For
local files and directories, use Returns immediately — the daemon indexes in the background. Args: source: HTTP(S) URL to ingest. overwrite: If true, replace a stored URL; if false, skip it. collection: Collection name. Auto-derived if empty. Returns: An accepted ingest task ID, not a completed indexing report. Input refusals, daemon errors, and unexpected failures return Error: ... text. Connection failures include recovery guidance. |
| rememberA | Use remember to save durable facts and observations across sessions. Use remember when you learn something durable — a decision, a gotcha, a non-obvious fact, a procedure — so it survives context compaction. remember = a specific durable fact, ingest = a URL, learn = a distilled lesson that gets retrieval preference. Call it at these five moments, not at the end and not never: a non-obvious root cause or gotcha (fact); a ratified design decision with its reason (fact); a repeatable how-to (procedure); a judgement you will revisit (opinion); and once before submitting a mission result (observation). Always pass your own agent_handle — the daemon cannot infer it, and a subagent's working directory resolves to the repo's leader, not to you. The daemon scrubs secrets/PII before indexing. Returns immediately — the daemon indexes in the background. Args:
content: The text content to remember.
document_name: Name for the document (e.g., 'notes.md').
overwrite: If true, replace existing data for this document. If
false, an existing document of this name is left untouched.
collection: Collection name. Leave empty to route by agent_handle —
Returns: The document name and accepted task ID; indexing runs in the background. Input refusals, daemon errors, and unexpected failures return Error: ... text. Connection failures include recovery guidance. |
| learnA | Use learn to save a distilled lesson for preferential retrieval. Use learn to save a distilled lesson that should outrank ordinary results for related queries -- a rule, a convention, a "do it this way" insight, not a one-off fact. remember = a specific durable fact, ingest = a URL, learn = a distilled lesson that gets retrieval preference. The daemon scrubs secrets/PII before indexing, same as remember. Lessons are capped at 500 characters -- use remember for anything longer. Returns immediately -- the daemon indexes in the background. Args: lesson: The distilled lesson text (<= 500 chars). topic: Optional domain tag (e.g. "testing", "release-process"). name: Optional user-visible slug for later reference. Returns: The admission status and task ID; lesson indexing runs in the background. Input refusals, daemon errors, and unexpected failures return Error: ... text. Connection failures include recovery guidance. |
| statusA | Use to check how much is indexed before you search or ingest. Returns: Formatted counts, storage size, and engine/model status for the target. Input refusals, daemon errors, and unexpected failures return Error: ... text. Connection failures include recovery guidance. |
| insightsA | Use to read your own recall stats: query volume, latency, recall mix. Returns: Formatted query volume, latency, and recall-mix statistics. Input refusals, daemon errors, and unexpected failures return Error: ... text. Connection failures include recovery guidance. |
| useA | Use to point every other tool at a different named database. All tools (find, ingest, sync, etc.) will target the selected database's daemon until changed again. Use list(kind="databases") to see the database the daemon is fixed to. Only selects among LOCAL databases: while a remote target (QUARRY_URL or a 'quarry login') is active, the remote daemon is fixed to its own database and this has no effect. Args: name: Database name (e.g., 'coding', 'work'). Use 'default' for the default database. Returns: The prior and selected local database and its resolved storage path; the selection affects only this MCP process, not the persisted default. Input refusals, daemon errors, and unexpected failures return Error: ... text. Connection failures include recovery guidance. |
| listA | Use to see what's already indexed before ingesting it again. Args: kind: What to list — "documents", "collections", "databases", or "registrations". collection: Optional collection filter (only for kind="documents"). Returns: A formatted catalog of the selected kind, optionally collection-filtered. Input refusals, daemon errors, and unexpected failures return Error: ... text. Connection failures include recovery guidance. |
| showA | Use to read a specific page, or to check whether a document is indexed. Use to read a specific page, or to check whether a document is already indexed. Without page_number: shows document metadata (pages, chunks, collection). With page_number: shows the full text for that page. Args: document_name: Document filename (e.g., 'report.pdf'). page_number: Page number (1-indexed); nonpositive means metadata only. collection: Optional collection scope. Returns: Document metadata (nonpositive page_number) or full page text. Missing documents/pages return ordinary not-found text, not an Error: result. Other failures return Error: ...; connection errors add recovery guidance. |
| deleteA | Use to remove stale or wrong content before re-ingesting it. Returns immediately — the daemon removes chunks in the background. Args: name: Document filename or collection name to delete. kind: What to delete — "document" or "collection". collection: Optional collection scope (only for kind="document"). Returns: A deletion task identifier, not confirmation that the data is gone. Input refusals, daemon errors, and unexpected failures return Error: ... text. Connection failures include recovery guidance. |
| register_directoryA | Use to track a local directory so future changes sync automatically. Returns immediately — the daemon records the registration in the background. Args: directory: Absolute path to the directory. collection: Collection name. Uses the directory name, sanitized, if empty. Returns: The resolved registration directory, collection, and accepted task ID; indexing continues in the background. Input refusals, daemon errors, and unexpected failures return Error: ... text. Connection failures include recovery guidance. |
| deregister_directoryA | Use to stop tracking a directory and optionally retain indexed data. Use to stop tracking a directory — keep its indexed data with
Returns the removed-file count synchronously; the chunk purge runs as a background task. An unknown collection surfaces as an error, not a removal confirmation. Args: collection: Collection name to deregister. keep_data: If true, keep indexed data in LanceDB. Returns: The removed registry-file count and the accepted chunk-purge task ID; the purge may still be running. Input refusals, daemon errors, and unexpected failures return Error: ... text. Connection failures include recovery guidance. |
| sync_all_registrationsA | Use after registering a new directory or changing tracked files. Use after registering a new directory, or when tracked files changed outside quarry's own writes. Returns immediately — the daemon runs the sync in the background. Returns: An accepted sync task ID, not a completed synchronization report. Input refusals, daemon errors, and unexpected failures return Error: ... text. Connection failures include recovery guidance. |
| missions_syncA | Use after Use after Reads this repo's Args: mission: Sync one mission id only; empty means every mission. dry_run: List what would be filed and post nothing. force: Re-file rounds the daemon already holds (matching key only). Returns: A report of filed/skipped rounds, scan errors (including missing missions), and per-round daemon failures; dry-run reports proposed writes only. Uncaught errors return Error: ...; connection errors add recovery guidance. |
Prompts
Interactive templates invoked by user choice
| Name | Description |
|---|---|
No prompts | |
Resources
Contextual data attached and managed by the client
| Name | Description |
|---|---|
No resources | |
TDQS
Scored across 14 tools
The write-side trio (remember/learn/ingest) is explicitly disambiguated in each description, and find vs show vs list vs status are separated by purpose. Residual overlap: delete(kind="collection") and deregister_directory(keep_data=False) both purge a collection, and list/status both surface catalog state.
Mostly a verb-first convention (remember, find, show, ingest, learn, delete, list, use) with compound verb_noun snake_case for the directory lifecycle tools. Minor deviations: missions_sync puts the noun first, and status/insights are noun-named admin tools.
14 tools sits comfortably in the healthy band and each maps to a real operation in a memory/knowledge-base lifecycle. Slightly heavy at the margins: insights adds little beyond status, and missions_sync is a narrow, environment-specific workflow tool.
Strong lifecycle coverage: write (remember/learn), ingest, search/read (find/show), catalog (list/status), removal (delete), directory registration and sync, plus database selection. Minor gaps: no collection create/rename, no document update short of overwrite-and-reingest, and no reindex/export path.