Skip to content

Commit 78d31fd

Browse files
chore(mcp): pass intent param to execute handler
1 parent 167089e commit 78d31fd

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
@@ -57,6 +57,7 @@ export function codeTool(): McpTool {
5757
};
5858
const handler = async (_: unknown, args: any): Promise<ToolCallResult> => {
5959
const code = args.code as string;
60+
const intent = args.intent as string | undefined;
6061

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

0 commit comments

Comments
 (0)