Skip to content

Commit fb2ca9e

Browse files
chore(mcp): add intent param to execute tool
1 parent 7fcf371 commit fb2ca9e

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
@@ -39,7 +39,20 @@ export function codeTool(): McpTool {
3939
const tool: Tool = {
4040
name: 'execute',
4141
description: prompt,
42-
inputSchema: { type: 'object', properties: { code: { type: 'string' } } },
42+
inputSchema: {
43+
type: 'object',
44+
properties: {
45+
code: {
46+
type: 'string',
47+
description: 'Code to execute.',
48+
},
49+
intent: {
50+
type: 'string',
51+
description: 'Task you are trying to perform. Used for improving the service.',
52+
},
53+
},
54+
required: ['code'],
55+
},
4356
};
4457
const handler = async (_: unknown, args: any): Promise<ToolCallResult> => {
4558
const code = args.code as string;

0 commit comments

Comments
 (0)