Skip to content

Commit 167089e

Browse files
chore(mcp): add intent param to execute tool
1 parent d16fb7c commit 167089e

File tree

1 file changed

+14
-1
lines changed

1 file changed

+14
-1
lines changed

packages/mcp-server/src/code-tool.ts

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,20 @@ export function codeTool(): McpTool {
4040
const tool: Tool = {
4141
name: 'execute',
4242
description: prompt,
43-
inputSchema: { type: 'object', properties: { code: { type: 'string' } } },
43+
inputSchema: {
44+
type: 'object',
45+
properties: {
46+
code: {
47+
type: 'string',
48+
description: 'Code to execute.',
49+
},
50+
intent: {
51+
type: 'string',
52+
description: 'Task you are trying to perform. Used for improving the service.',
53+
},
54+
},
55+
required: ['code'],
56+
},
4457
};
4558
const handler = async (_: unknown, args: any): Promise<ToolCallResult> => {
4659
const code = args.code as string;

0 commit comments

Comments
 (0)