Add a new MCP tool to this server - input and output zod shapes in src/domain/schemas.ts, a module under src/mcp/tools/, registration in src/mcp/server.ts and TOOLNAMES, the KnowledgeService method, annotations, tests. Use whenever a new capability must be exposed over MCP, or when changing an existing tool's schema…
Runbook for changing the embedding model, dimensions or provider - what chunk provenance guarantees, the ordered steps (add provider, update EMBEDDINGMODEL/DIMENSIONS, recreate the vector index if the width changed, run db:reembed, verify with embeddingCoverage), why search stays correct mid-backfill, incremental…
How to match strings case-insensitively or by substring without leaving the index — why a case-insensitive $regex can never use one, the keywordLowercase wildcard recipe behind browse search, token vs string mappings, sorting and counting inside $search, and what eventual consistency does to tests. Use whenever adding…
The validate - chunk - embed - persist contract for this knowledge base, stage by stage, with each stage's invariants and what silently breaks when one is violated. Use before changing the chunker, the embedding provider, the chunk/document schema, or anything in storeContent, and to work out what to re-run to prove…
How MongoDB Vector Search and MongoDB Search index definitions are declared as code in src/db/index-definitions/, applied identically to Atlas Local and cloud Atlas by npm run db:indexes, how drift and readiness are detected, how to add a filter path, and the drop-recreate-re-embed path for a numDimensions or…
Claude Code instructions for jtv4k/mongodb-memory-mcp, covering claude.md — mongodb memory mcp, 0. hard rules — violate none of these, 1. what this is, 2. stack, and why and 3. typescript facts that trip people up.