Skip to content

Commit 45f6b35

Browse files
committed
added back in console errors
1 parent d5ed2ef commit 45f6b35

File tree

1 file changed

+17
-17
lines changed

1 file changed

+17
-17
lines changed

mcp-server/src/mcp-server.ts

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -38,23 +38,23 @@ server.tool("getConsoleLogs", "Check our browser logs", async () => {
3838
};
3939
});
4040

41-
// server.tool(
42-
// "getConsoleErrors",
43-
// "Check our browsers console errors",
44-
// async () => {
45-
// const response = await fetch(`http://127.0.0.1:${PORT}/console-errors`);
46-
// const json = await response.json();
47-
// const last50 = json.slice(-50);
48-
// return {
49-
// content: [
50-
// {
51-
// type: "text",
52-
// text: JSON.stringify(last50, null, 2),
53-
// },
54-
// ],
55-
// };
56-
// }
57-
// );
41+
server.tool(
42+
"getConsoleErrors",
43+
"Check our browsers console errors",
44+
async () => {
45+
const response = await fetch(`http://127.0.0.1:${PORT}/console-errors`);
46+
const json = await response.json();
47+
const last50 = json.slice(-50);
48+
return {
49+
content: [
50+
{
51+
type: "text",
52+
text: JSON.stringify(last50, null, 2),
53+
},
54+
],
55+
};
56+
}
57+
);
5858

5959
// Return all HTTP errors (4xx/5xx)
6060
server.tool("getNetworkErrors", "Check our network ERROR logs", async () => {

0 commit comments

Comments
 (0)