release r010 add Unraid health and Community Apps tools
This commit is contained in:
+8
-13
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user