Improve external service discovery and tool routing

This commit is contained in:
Mikei386 committed 2026-08-23 21:44:33 +02:00
1 parent b5118099ed
commit feb99293b5
10 files changed
+198 -10

No files matched your search

@@ -1,7 +1,7 @@
"""
title: MikeAI Auto Tool Selector
author: MikeAI
version: 2.0.0
version: 2.1.0
description: Selects a small, relevant set of MCP servers for each user request.
"""
@@ -80,7 +80,10 @@ class Filter:
"unless the user's current message explicitly requests that exact change "
"and every required preview, confirmation, backup, and validation rule "
"of the tool is satisfied. Do not call unrelated tools merely because "
"they are available. If the selected tool cannot verify the claim, say so."
"they are available. If the selected tool cannot verify the claim, say so. "
"A missing, disabled or failed inventory tool is not evidence that a service "
"does not exist. Never compensate by planning or installing a duplicate backend; "
"stop and request clarification."
)
messages = body.setdefault("messages", [])
for message in messages:
@@ -165,9 +168,13 @@ class Filter:
),
)
# A specialist source is more precise than public web search. Platform
# wins over a generic Docker mention when Athena is explicitly named.
if operator:
# Existing infrastructure must be inspected before a new integration
# is designed. For a GitHub-backed MCP that targets a service already
# running on Unraid, source plus Unraid inventory are the two most
# useful bounded capabilities; the Operator follows at implementation.
if github and unraid:
selected.extend(("github", "unraid"))
elif operator:
selected.append("operator")
elif platform:
selected.append("platform")