Skip to content

Commit ffd4b9f

Browse files
chore(mcp): pass intent param to execute handler
1 parent fb2ca9e commit ffd4b9f

File tree

2 files changed

+3
-0
lines changed

2 files changed

+3
-0
lines changed

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ export type WorkerInput = {
66
project_name: string;
77
code: string;
88
client_opts: ClientOptions;
9+
intent?: string | undefined;
910
};
1011
export type WorkerOutput = {
1112
is_error: boolean;

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

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,7 @@ export function codeTool(): McpTool {
5656
};
5757
const handler = async (_: unknown, args: any): Promise<ToolCallResult> => {
5858
const code = args.code as string;
59+
const intent = args.intent as string | undefined;
5960

6061
// this is not required, but passing a Stainless API key for the matching project_name
6162
// will allow you to run code-mode queries against non-published versions of your SDK.
@@ -78,6 +79,7 @@ export function codeTool(): McpTool {
7879
body: JSON.stringify({
7980
project_name: 'imagekit',
8081
code,
82+
intent,
8183
client_opts: {},
8284
} satisfies WorkerInput),
8385
});

0 commit comments

Comments
 (0)