diff --git a/docs/CLINICAL_ASSISTANT.md b/docs/CLINICAL_ASSISTANT.md index ec448696..2ca5d727 100644 --- a/docs/CLINICAL_ASSISTANT.md +++ b/docs/CLINICAL_ASSISTANT.md @@ -16,7 +16,7 @@ The Clinical Assistant is a retrieval-grounded assistant for pediatric clinical ```txt User asks a question -> browser posts to Ped-AI - -> Ped-AI calls MCP `nc_semantic_search` + -> Ped-AI calls MCP `clinical_semantic_search` -> MCP returns source excerpts and metadata -> Ped-AI builds an answer prompt with source constraints -> LiteLLM model returns answer text diff --git a/src/utils/clinicalMcpClient.js b/src/utils/clinicalMcpClient.js index 3fae5326..c5468030 100644 --- a/src/utils/clinicalMcpClient.js +++ b/src/utils/clinicalMcpClient.js @@ -3,13 +3,12 @@ var sleep = require('node:timers/promises').setTimeout; var MCP_URLS = buildMcpUrls(); var _lastGoodMcpUrl = MCP_URLS[0]; -// Search tool name is env-driven; invalid values stop the app before any MCP call. +// The server names this tool clinical_semantic_search. The old nc_ alias is +// gone from both sides; a stale override would silently retrieve nothing, so it +// stops the app here rather than at the first search. var SEARCH_TOOL_NAME = process.env.CLINICAL_ASSISTANT_SEARCH_TOOL || 'clinical_semantic_search'; -if (SEARCH_TOOL_NAME !== 'clinical_semantic_search' && SEARCH_TOOL_NAME !== 'nc_semantic_search') { - throw new Error('CLINICAL_ASSISTANT_SEARCH_TOOL must be clinical_semantic_search or nc_semantic_search'); -} -if (SEARCH_TOOL_NAME === 'nc_semantic_search') { - console.warn('[clinical-mcp] CLINICAL_ASSISTANT_SEARCH_TOOL=nc_semantic_search is deprecated; prefer clinical_semantic_search'); +if (SEARCH_TOOL_NAME !== 'clinical_semantic_search') { + throw new Error('CLINICAL_ASSISTANT_SEARCH_TOOL must be clinical_semantic_search (the nc_semantic_search alias was removed)'); } var MCP_INITIALIZE_TIMEOUT_MS = positiveInt(process.env.CLINICAL_ASSISTANT_MCP_INITIALIZE_TIMEOUT_MS, 30000); var MCP_REQUEST_TIMEOUT_MS = positiveInt(process.env.CLINICAL_ASSISTANT_MCP_REQUEST_TIMEOUT_MS, 90000);