fix: mcp server output msg format (#154)
* fix output msg format * improve --------- Co-authored-by: sigoden <sigoden@gmail.com>
This commit is contained in:
+3
-3
@@ -90,12 +90,12 @@ server.setRequestHandler(CallToolRequestSchema, async (request) => {
|
|||||||
output = await fs.promises.readFile(tmpFile, "utf8");
|
output = await fs.promises.readFile(tmpFile, "utf8");
|
||||||
} catch { };
|
} catch { };
|
||||||
return {
|
return {
|
||||||
content: [{ type: "text", value: output }],
|
content: [{ type: "text", text: output }],
|
||||||
}
|
};
|
||||||
} else {
|
} else {
|
||||||
return {
|
return {
|
||||||
isError: true,
|
isError: true,
|
||||||
error: stderr,
|
content: [{ type: "text", text: stderr }],
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|||||||
Reference in New Issue
Block a user