Skip to content

Commit 4fe20d8

Browse files
committed
docs(05-04): document mcp.caps config surface in llms.txt
- Add new 'MCP response caps (v0.2.0+)' section listing all three keys (max_top_k=25, max_query_chars=250, max_preview_chars=200) with one-line behavioral descriptions (clamping signal, schema-baked Pydantic rejection, preview-vs-payload distinction). - Extend the 'MCP tools' section with response-shape note for v0.2.0: Chunk.preview, Chunk.text intact-payload guarantee, top-level SearchResult.clamped_to. Note D-17 alias parity on qdrant_find. - Turns tests/test_docs_drift.py::test_llms_txt_mentions_caps green (was the last red Wave-3 test from Phase 5). - README.md and 4 translations untouched per PUB-05 gate / Plan 05-04 Task 02 step 4.
1 parent e95a277 commit 4fe20d8

1 file changed

Lines changed: 10 additions & 2 deletions

File tree

llms.txt

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,11 +45,19 @@ installed, AI coding assistants gain persistent semantic memory across projects.
4545

4646
## MCP tools (v0.1.3)
4747

48-
- `dual_memory_search`: Hybrid (BM25+dense, RRF) retrieval over the project's Qdrant collection. Top-k, latency, summary
48+
- `dual_memory_search`: Hybrid (BM25+dense, RRF) retrieval over the project's Qdrant collection. Top-k, latency, summary. Response shape (v0.2.0+): each `Chunk` carries `text` (full intact payload) and `preview` (display-only excerpt capped at `mcp.caps.max_preview_chars`); top-level `SearchResult.clamped_to` is set when the server clamped requested `top_k`
4949
- `dual_memory_write`: Persist agent-authored memory — writes Markdown to `<project>/.claude/insights/_agent/<slug>.md` with YAML frontmatter, immediately upserts into Qdrant (wait=True), idempotent on topic via UUIDv5
50-
- `qdrant_find` (alias of dual_memory_search): Backward-compat for users coming from upstream `mcp-server-qdrant`
50+
- `qdrant_find` (alias of dual_memory_search): Backward-compat for users coming from upstream `mcp-server-qdrant`. Inherits the same caps and response shape as the canonical tool (D-17 alias parity)
5151
- `qdrant_store` (alias of dual_memory_write): Same compat shim. Disable both aliases with `SUPAMEM_QDRANT_ALIASES=0`
5252

53+
## MCP response caps (v0.2.0+)
54+
55+
Server-side hard caps on every retrieval response. Configured under the `[supamem.mcp.caps]` TOML table; surfaced in `supamem doctor` with config-source provenance.
56+
57+
- `mcp.caps.max_top_k` (default: 25) — server silently clamps requested `top_k` to this value; `SearchResult.clamped_to` is populated when clamping fires so callers can detect it
58+
- `mcp.caps.max_query_chars` (default: 250) — Pydantic `Field(max_length=...)` baked into the tool schema at registration time; queries longer than the cap are rejected with a structured MCP validation error (no silent truncation, no stdout pollution)
59+
- `mcp.caps.max_preview_chars` (default: 200) — display preview cap on each `Chunk.preview`; the full canonical payload in `Chunk.text` is never truncated
60+
5361
## Visibility surfaces (v0.1.4+)
5462

5563
- `supamem live` CLI: Rich-Live terminal dashboard, real-time tail of the audit JSONL with rotation/resize/Ctrl-C handling and pipe-safe plain-JSONL fallback when stdout isn't a TTY

0 commit comments

Comments
 (0)