release r010 add Unraid health and Community Apps tools

This commit is contained in:
Mikei386
2026-08-21 10:14:16 +02:00
parent e586b22b13
commit 771b8c43a1
14 changed files with 831 additions and 33 deletions
+8 -13
View File
@@ -179,20 +179,15 @@ async function handleMcpRequest(
const result: Record<string, unknown> = {
content: [{ type: "text", text }],
};
// structuredContent für Tools mit JSON-Output
if (
[
"unraid_docker_list",
"unraid_network_inventory",
"unraid_docker_analyze_logs",
"unraid_network_audit_tcp",
].includes(toolName)
) {
try {
result.structuredContent = JSON.parse(text);
} catch {
// ignore
// JSON-Ausgaben zusätzlich strukturiert bereitstellen. Reiner Text
// bleibt unverändert im normalen MCP-Content-Feld.
try {
const structured = JSON.parse(text);
if (structured !== null && typeof structured === "object") {
result.structuredContent = structured;
}
} catch {
// Kein JSON-Tool: Textausgabe genügt.
}
return { response: rpcResult(id, result), sessionId: sessionId ?? "" };
} catch (e) {