Skip to content

Commit 7be52f9

Browse files
authored
fix asTool execute function (#906)
* fix asTool execute function * bump * import type
1 parent be716a8 commit 7be52f9

2 files changed

Lines changed: 5 additions & 2 deletions

File tree

packages/runtime/jsr.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@deco/workers-runtime",
3-
"version": "0.6.1",
3+
"version": "0.6.2",
44
"exports": {
55
".": "./src/index.ts",
66
"./mastra": "./src/mastra.ts",

packages/runtime/src/proxy.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
// deno-lint-ignore-file no-explicit-any
2+
import type { ToolExecutionContext } from "@mastra/core";
23
import type { CreateStubAPIOptions } from "./mcp.ts";
34

45
const getWorkspace = (workspace?: string) => {
@@ -201,7 +202,9 @@ export function createMCPClientProxy<T extends Record<string, unknown>>(
201202
? options?.jsonSchemaToZod?.(tool.outputSchema) ??
202203
tool.outputSchema
203204
: undefined,
204-
execute: callToolFn,
205+
execute: ({ context }: ToolExecutionContext<any>) => {
206+
return callToolFn(context);
207+
},
205208
};
206209
};
207210
return callToolFn;

0 commit comments

Comments
 (0)