From 34fccfd38bb19d23b938f3d65b27a69cfdf5c08b Mon Sep 17 00:00:00 2001 From: Oliver Kieselbach Date: Fri, 29 May 2026 16:56:28 +0200 Subject: [PATCH] docs(mcp-search): disclose event-type-driven cross-session recall limit MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cross-session search only fetches events whose TYPE maps to a query keyword, so a concept with no event type of its own (e.g. "certificate") is never reached cross-session even when it sits inside another event's data/message. Spell this out in both tool descriptions and point the caller at the honest workarounds — scope to a sessionId (scans every field of every event) or search by a related event type — and tie it to the keywordsUsed signal so the model can detect the miss itself. Co-Authored-By: Claude Opus 4.8 (1M context) --- .../autopilot-monitor-mcp/src/tools/search.ts | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/src/McpServer/autopilot-monitor-mcp/src/tools/search.ts b/src/McpServer/autopilot-monitor-mcp/src/tools/search.ts index 1334c90e..62aeba69 100644 --- a/src/McpServer/autopilot-monitor-mcp/src/tools/search.ts +++ b/src/McpServer/autopilot-monitor-mcp/src/tools/search.ts @@ -398,6 +398,11 @@ export function registerSearchTools(server: McpServer, knowledgeBase: SearchProv 'When the query implies a problem (error/fail/stuck/timeout…), ranking lifts failure/Warning events and damps ' + 'benign Info/Trace events. `matchedSessionIds` lists the distinct sessions behind the ranked hits (drill into ' + 'these next); `sessionsSearchedCount` is how many sessions were scanned. ' + + 'IMPORTANT — cross-session recall is event-TYPE-driven: with no sessionId, the scan first maps your keywords to ' + + 'known event types (see the event_types catalog) and only fetches events of those types. A concept that has no ' + + 'event type of its own (e.g. "certificate") will NOT surface cross-session even when it lives inside another ' + + 'event\'s data/message — so if a keyword maps to no event type, that info is likely buried elsewhere: pass a ' + + 'sessionId (which scans EVERY field of EVERY event in that session) or search by a related event type instead. ' + 'Provide sessionId to search within one session, or omit for a fast (single-page-per-type) cross-session scan. ' + 'This is a bounded scan: check the returned `truncated` flag — if true, recall is incomplete, so escalate to ' + 'deep_search_events for a broader multi-page scan or narrow the query as `recallNote` suggests.', @@ -550,6 +555,12 @@ export function registerSearchTools(server: McpServer, knowledgeBase: SearchProv 'benign Info/Trace events so a successful enrollment can\'t outrank a real error. ' + '`matchedSessionIds` lists the distinct sessions behind the ranked hits (drill into these next); ' + '`sessionsSearchedCount` is how many sessions were scanned. ' + + 'IMPORTANT — cross-session recall is event-TYPE-driven: with no sessionId the scan maps your keywords to known ' + + 'event types (see the event_types catalog) and only fetches events of those types; it then scores ALL their ' + + 'fields including full DataJson, but a concept with no event type of its own (e.g. "certificate") is never ' + + 'reached cross-session even when it lives inside another event\'s data. If `keywordsUsed` shows your key term ' + + 'mapped to no event type, that info is likely buried elsewhere — pass a sessionId (scans EVERY field of EVERY ' + + 'event in the session, complete and untruncated) or search by a related event type. ' + 'Check the `truncated` flag: if true, the scan hit its page/time budget (or fell back to recent failed ' + 'sessions) and recall is incomplete — narrow the query as `recallNote` suggests. ' + 'Provide sessionId to search within one session (complete, no truncation), or omit to search across sessions.' +