@mastra/mcp 1.0.0-beta.0 → 1.0.0-beta.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +11 -0
- package/dist/index.cjs +8 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +8 -1
- package/dist/index.js.map +1 -1
- package/dist/server/server.d.ts.map +1 -1
- package/package.json +3 -3
package/dist/index.js
CHANGED
|
@@ -2568,7 +2568,14 @@ Provided arguments: ${JSON.stringify(request.params.arguments, null, 2)}`
|
|
|
2568
2568
|
`Executing agent tool '${agentToolName}' for agent '${agent.name}' with message: "${inputData.message}"`
|
|
2569
2569
|
);
|
|
2570
2570
|
try {
|
|
2571
|
-
const
|
|
2571
|
+
const proxiedContext = context?.requestContext || new RequestContext();
|
|
2572
|
+
if (context?.mcp?.extra) {
|
|
2573
|
+
proxiedContext.set("mcp.extra", context.mcp.extra);
|
|
2574
|
+
}
|
|
2575
|
+
const response = await agent.generate(inputData.message, {
|
|
2576
|
+
...context ?? {},
|
|
2577
|
+
requestContext: proxiedContext
|
|
2578
|
+
});
|
|
2572
2579
|
return response;
|
|
2573
2580
|
} catch (error) {
|
|
2574
2581
|
this.logger.error(`Error executing agent tool '${agentToolName}' for agent '${agent.name}':`, error);
|