hono-mcp 1.4.4 → 1.4.6
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.
|
@@ -5,8 +5,10 @@ export const executeCommandTool = (server) => {
|
|
|
5
5
|
type: z
|
|
6
6
|
.string()
|
|
7
7
|
.describe("Command type (e.g., math.add, math.subtract, math.multiply, math.divide)"),
|
|
8
|
-
params: z
|
|
9
|
-
|
|
8
|
+
params: z
|
|
9
|
+
.record(z.unknown())
|
|
10
|
+
.describe("Command parameters (optional for commands without params)"),
|
|
11
|
+
}, async ({ type, params = {}, }) => {
|
|
10
12
|
console.log("executeCommand called with:", { type, params });
|
|
11
13
|
const command = getCommandRegistry().get(type);
|
|
12
14
|
if (!command) {
|
|
@@ -40,10 +42,10 @@ export const executeCommandTool = (server) => {
|
|
|
40
42
|
};
|
|
41
43
|
export const helpTool = (server) => {
|
|
42
44
|
server.tool("help", "Get help information about available commands", {
|
|
43
|
-
type:
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
45
|
+
type: z
|
|
46
|
+
.string()
|
|
47
|
+
.optional()
|
|
48
|
+
.describe("Command type to get help for (optional)"),
|
|
47
49
|
}, async ({ type }) => {
|
|
48
50
|
if (type) {
|
|
49
51
|
const command = getCommandRegistry().get(type);
|