@mastra/mcp 2.8.0-alpha.0 → 2.8.0-alpha.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.
@@ -3,7 +3,7 @@ name: mastra-mcp
3
3
  description: Documentation for @mastra/mcp. Use when working with @mastra/mcp APIs, configuration, or implementation.
4
4
  metadata:
5
5
  package: "@mastra/mcp"
6
- version: "2.8.0-alpha.0"
6
+ version: "2.8.0-alpha.1"
7
7
  ---
8
8
 
9
9
  ## When to use
@@ -1,5 +1,5 @@
1
1
  {
2
- "version": "2.8.0-alpha.0",
2
+ "version": "2.8.0-alpha.1",
3
3
  "package": "@mastra/mcp",
4
4
  "exports": {},
5
5
  "modules": {}
package/dist/index.cjs CHANGED
@@ -23245,10 +23245,10 @@ var MCPServer = class extends _mastra_core_mcp.MCPServerBase {
23245
23245
  });
23246
23246
  this.setTracedHandler(server, "tools/call", async (request, ctx, trace) => {
23247
23247
  const name = request.params.name;
23248
- const tool = this.convertedTools[name];
23248
+ const tool = Object.hasOwn(this.convertedTools, name) ? this.convertedTools[name] : void 0;
23249
23249
  if (!tool) {
23250
23250
  this.logger.warn("Unknown tool requested", { tool: name });
23251
- return errorResult$1(`Unknown tool: ${name}`);
23251
+ throw new _modelcontextprotocol_server.ProtocolError(_modelcontextprotocol_server.ProtocolErrorCode.InvalidParams, `Unknown tool: ${name}`);
23252
23252
  }
23253
23253
  const args = request.params.arguments ?? {};
23254
23254
  const argsHash = hashArguments(args);