{ "version": 1, "servers": { "qmd": { "configHash": "fd16eaf87d17a4ce5efee10dc65237dbbe1403353bbbfc4a7de196abe21ab5f9", "tools": [ { "name": "query", "description": "Search the knowledge base using a query document — one or more typed sub-queries combined for best recall.\n\n## Query Types\n\n**lex** — BM25 keyword search. Fast, exact, no LLM needed.\nFull lex syntax:\n- `term` — prefix match (\"perf\" matches \"performance\")\n- `\"exact phrase\"` — phrase must appear verbatim\n- `-term` or `-\"phrase\"` — exclude documents containing this\n\nGood lex examples:\n- `\"connection pool\" timeout -redis`\n- `\"machine learning\" -sports -athlete`\n- `handleError async typescript`\n\n**vec** — Semantic vector search. Write a natural language question. Finds documents by meaning, not exact words.\n- `how does the rate limiter handle burst traffic?`\n- `what is the tradeoff between consistency and availability?`\n\n**hyde** — Hypothetical document. Write 50-100 words that look like the answer. Often the most powerful for nuanced topics.\n- `The rate limiter uses a token bucket algorithm. When a client exceeds 100 req/min, subsequent requests return 429 until the window resets.`\n\n## Strategy\n\nCombine types for best results. First sub-query gets 2× weight — put your strongest signal first.\n\n| Goal | Approach |\n|------|----------|\n| Know exact term/name | `lex` only |\n| Concept search | `vec` only |\n| Best recall | `lex` + `vec` |\n| Complex/nuanced | `lex` + `vec` + `hyde` |\n| Unknown vocabulary | Use a standalone natural-language query (no typed lines) so the server can auto-expand it |\n\n## Examples\n\nSimple lookup:\n```json\n[{ \"type\": \"lex\", \"query\": \"CAP theorem\" }]\n```\n\nBest recall on a technical topic:\n```json\n[\n { \"type\": \"lex\", \"query\": \"\\\"connection pool\\\" timeout -redis\" },\n { \"type\": \"vec\", \"query\": \"why do database connections time out under load\" },\n { \"type\": \"hyde\", \"query\": \"Connection pool exhaustion occurs when all connections are in use and new requests must wait. This typically happens under high concurrency when queries run longer than expected.\" }\n]\n```\n\nIntent-aware lex (C++ performance, not sports):\n```json\n[\n { \"type\": \"lex\", \"query\": \"\\\"C++ performance\\\" optimization -sports -athlete\" },\n { \"type\": \"vec\", \"query\": \"how to optimize C++ program performance\" }\n]\n```", "inputSchema": { "type": "object", "properties": { "searches": { "minItems": 1, "maxItems": 10, "type": "array", "items": { "type": "object", "properties": { "type": { "type": "string", "enum": [ "lex", "vec", "hyde" ], "description": "lex = BM25 keywords (supports \"phrase\" and -negation); vec = semantic question; hyde = hypothetical answer passage" }, "query": { "type": "string", "description": "The query text. For lex: use keywords, \"quoted phrases\", and -negation. For vec: natural language question. For hyde: 50-100 word answer passage." } }, "required": [ "type", "query" ] }, "description": "Typed sub-queries to execute (lex/vec/hyde). First gets 2x weight." }, "limit": { "default": 10, "description": "Max results (default: 10)", "type": "number" }, "minScore": { "default": 0, "description": "Min relevance 0-1 (default: 0)", "type": "number" }, "collections": { "description": "Filter to collections (OR match)", "type": "array", "items": { "type": "string" } } }, "required": [ "searches" ], "$schema": "http://json-schema.org/draft-07/schema#" } }, { "name": "get", "description": "Retrieve the full content of a document by its file path or docid. Use paths or docids (#abc123) from search results. Suggests similar files if not found.", "inputSchema": { "type": "object", "properties": { "file": { "type": "string", "description": "File path or docid from search results (e.g., 'pages/meeting.md', '#abc123', or 'pages/meeting.md:100' to start at line 100)" }, "fromLine": { "description": "Start from this line number (1-indexed)", "type": "number" }, "maxLines": { "description": "Maximum number of lines to return", "type": "number" }, "lineNumbers": { "default": false, "description": "Add line numbers to output (format: 'N: content')", "type": "boolean" } }, "required": [ "file" ], "$schema": "http://json-schema.org/draft-07/schema#" } }, { "name": "multi_get", "description": "Retrieve multiple documents by glob pattern (e.g., 'journals/2025-05*.md') or comma-separated list. Skips files larger than maxBytes.", "inputSchema": { "type": "object", "properties": { "pattern": { "type": "string", "description": "Glob pattern or comma-separated list of file paths" }, "maxLines": { "description": "Maximum lines per file", "type": "number" }, "maxBytes": { "default": 10240, "description": "Skip files larger than this (default: 10240 = 10KB)", "type": "number" }, "lineNumbers": { "default": false, "description": "Add line numbers to output (format: 'N: content')", "type": "boolean" } }, "required": [ "pattern" ], "$schema": "http://json-schema.org/draft-07/schema#" } }, { "name": "status", "description": "Show the status of the QMD index: collections, document counts, and health information.", "inputSchema": { "type": "object", "properties": {}, "$schema": "http://json-schema.org/draft-07/schema#" } } ], "resources": [], "cachedAt": 1772656106222 } } }