diff --git a/CLAUDE.md b/CLAUDE.md index 476dbd9..4fc5dc6 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -50,7 +50,7 @@ Access tokens are stored in a shared file `.active_tokens.json` so all 5 service - `contacts/server.py` — CardDAV; search/get/create, contact photos - `files/server.py` — WebDAV; list/read/write/delete/move/search, images + documents - `notes/server.py` — Joplin Data API; list/search/read/create notes, list_note_resources, read_resource -- `tests/test_all.py` — 54 integration tests (pytest), daily via `mcp-tests.timer` +- `tests/` — Schichten: `test_smoke.py` (NIGHTLY via `mcp-tests.timer`, nur up+Auth+1 Read/Connector), `test_edge.py`+`test_stress.py`+`test_all.py` (ON-DEMAND via `run_full_tests.sh`). Doku `tests/MCPTEST.md` ## Dependencies @@ -68,7 +68,11 @@ Each server is a systemd unit `mcp-.service` (uvicorn). Each subdomain is - Text → `TextContent` - Images (jpg/png/gif/webp) → `ImageContent` (base64 inline) -- Documents (PDF, docx, xlsx) / other binary → `EmbeddedResource` with `BlobResourceContents` (base64 + mimeType) — claude.ai processes these client-side +- PDFs → server-seitig zu Text extrahiert bzw. gescannte Seiten als PNG+OCR gerendert (`pdfutil.py`). claude.ai nimmt KEINE PDF/Dokument-Blobs aus Tool-Results nativ entgegen (nur Text + Bild). Andere Binaerdateien → `EmbeddedResource`/`BlobResourceContents` (Blob; wird von claude.ai nicht als Dokument verarbeitet) + +## Robustheit / Limits + +Alle Such-/List-Tools sind gegen grosse Datenmengen abgesichert (single-threaded Server darf nicht haengen): Mail per-Mail try/except + `DEADLINE_S`/`MAX_SCAN`; Files `search_files` `SEARCH_DEADLINE_S`/`SEARCH_MAX_DIRS`; Calendar/Contacts `PARSE_DEADLINE_S` + `MAX_RESULTS`-Output-Cap. Details + Messwerte: `tests/MCPTEST.md`. ## Adding a New Service @@ -77,7 +81,7 @@ Each server is a systemd unit `mcp-.service` (uvicorn). Each subdomain is 3. nginx vhost `.mcp.home.slohmaier.de` + Certbot 4. systemd unit `mcp-.service` 5. Backend creds in `config.json` -6. Tests in `tests/test_all.py`, update dashboard + this file +6. Tests: Smoke-Read in `test_smoke.py` + Edge in `test_edge.py` + Stress in `test_stress.py` (Funktional in `test_all.py`); Dashboard + dieses File aktualisieren ## Tool Design Guidelines