fix: use exact match for mcporter tool capability validation

actualTools.some(a => a.includes(t)) is a substring check —
'vector_search'.includes('search') === true, so a missing 'search'
tool would be silently masked by 'vector_search' existing.

Switch to actualTools.includes(t) for strict equality per element.
This commit is contained in:
Brian Newman 2026-03-18 14:09:05 -07:00
parent 905076ca1e
commit 1518fc7a43

View File

@ -1247,7 +1247,7 @@ export class QmdMemoryManager implements MemorySearchManager {
.split("\n")
.map((l) => l.trim())
.filter(Boolean);
const missing = expectedTools.filter((t) => !actualTools.some((a) => a.includes(t)));
const missing = expectedTools.filter((t) => !actualTools.includes(t));
if (missing.length > 0) {
log.warn(
`mcporter bridge tool mismatch for server "${mcporter.serverName}": ` +