Skip to content

Commit acb4a88

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

2 files changed

Lines changed: 3 additions & 0 deletions

File tree

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
@@ -54,6 +54,7 @@ export function codeTool(): McpTool {
5454
};
5555
const handler = async (_: unknown, args: any): Promise<ToolCallResult> => {
5656
const code = args.code as string;
57+
const intent = args.intent as string | undefined;
5758

5859
// this is not required, but passing a Stainless API key for the matching project_name
5960
// will allow you to run code-mode queries against non-published versions of your SDK.
@@ -74,6 +75,7 @@ export function codeTool(): McpTool {
7475
body: JSON.stringify({
7576
project_name: 'scan-documents',
7677
code,
78+
intent,
7779
client_opts: {},
7880
} satisfies WorkerInput),
7981
});

0 commit comments

Comments
 (0)