@mrfentmen/chuck-norris-mcp 1.0.3 → 1.0.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/server.js +41 -0
- package/package.json +2 -2
package/dist/server.js
CHANGED
|
@@ -74,5 +74,46 @@ export function createServer() {
|
|
|
74
74
|
return textError(String(e));
|
|
75
75
|
}
|
|
76
76
|
});
|
|
77
|
+
const serverName = "chuck-norris-mcp";
|
|
78
|
+
server.registerTool("health_check", {
|
|
79
|
+
title: "Health check",
|
|
80
|
+
description: "Check if the server is running and responsive.",
|
|
81
|
+
inputSchema: z.object({}),
|
|
82
|
+
annotations: READ_ONLY,
|
|
83
|
+
}, async () => {
|
|
84
|
+
return text("OK - server is running");
|
|
85
|
+
});
|
|
86
|
+
server.registerTool("version_info", {
|
|
87
|
+
title: "Version info",
|
|
88
|
+
description: "Get server version and metadata.",
|
|
89
|
+
inputSchema: z.object({}),
|
|
90
|
+
annotations: READ_ONLY,
|
|
91
|
+
}, async () => {
|
|
92
|
+
return text(JSON.stringify({ name: serverName, version: "1.0.0" }, null, 2));
|
|
93
|
+
});
|
|
94
|
+
server.registerTool("list_tools", {
|
|
95
|
+
title: "List tools",
|
|
96
|
+
description: "List all available tools on this server.",
|
|
97
|
+
inputSchema: z.object({}),
|
|
98
|
+
annotations: READ_ONLY,
|
|
99
|
+
}, async () => {
|
|
100
|
+
return text("See the tools/list response for the full tool list.");
|
|
101
|
+
});
|
|
102
|
+
server.registerTool("echo", {
|
|
103
|
+
title: "Echo",
|
|
104
|
+
description: "Echo back the provided text.",
|
|
105
|
+
inputSchema: z.object({ text: z.string().describe("Text to echo.") }),
|
|
106
|
+
annotations: READ_ONLY,
|
|
107
|
+
}, async (args) => {
|
|
108
|
+
return text(String(args?.text ?? ""));
|
|
109
|
+
});
|
|
110
|
+
server.registerTool("timestamp", {
|
|
111
|
+
title: "Timestamp",
|
|
112
|
+
description: "Get the current UTC timestamp.",
|
|
113
|
+
inputSchema: z.object({}),
|
|
114
|
+
annotations: READ_ONLY,
|
|
115
|
+
}, async () => {
|
|
116
|
+
return text(new Date().toISOString());
|
|
117
|
+
});
|
|
77
118
|
return server;
|
|
78
119
|
}
|