Skip to content

Commit 0ac967a

Browse files
committed
chore: fix typings
1 parent 71d6a7b commit 0ac967a

File tree

1 file changed

+6
-5
lines changed

1 file changed

+6
-5
lines changed

tests/accuracy/sdk/accuracyTestingClient.ts

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import { v4 as uuid } from "uuid";
22
import { experimental_createMCPClient as createMCPClient, tool as createVercelTool } from "ai";
3-
import type { ToolCallOptions } from "ai";
3+
import type { Tool } from "ai";
44
import type { CallToolResult } from "@modelcontextprotocol/sdk/types.js";
55
import { StdioClientTransport } from "@modelcontextprotocol/sdk/client/stdio.js";
66

@@ -36,9 +36,10 @@ export class AccuracyTestingClient {
3636
const rewrappedVercelTools: VercelMCPClientTools = {};
3737
for (const [toolName, tool] of Object.entries(vercelTools)) {
3838
rewrappedVercelTools[toolName] = createVercelTool({
39-
...tool,
40-
// eslint-disable-next-line
41-
execute: (async (args: unknown, options: ToolCallOptions) => {
39+
// tool is an insantiated tool, while createVercelTool requires a tool definition.
40+
// by using this explicit casting, we ensure the type system understands what we are doing.
41+
...(tool as Tool<unknown, unknown>),
42+
execute: async (args, options) => {
4243
this.llmToolCalls.push({
4344
toolCallId: uuid(),
4445
toolName: toolName,
@@ -62,7 +63,7 @@ export class AccuracyTestingClient {
6263
content: JSON.stringify(error),
6364
};
6465
}
65-
}) as any, // eslint-disable-line
66+
},
6667
}) as VercelMCPClientTools[string];
6768
}
6869

0 commit comments

Comments
 (0)