@mastra/mcp 0.10.13-alpha.0 → 0.11.0-alpha.2
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/.turbo/turbo-build.log +1 -1
- package/CHANGELOG.md +22 -0
- package/dist/index.cjs +5 -6
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +3 -4
- package/dist/index.js.map +1 -1
- package/dist/server/server.d.ts.map +1 -1
- package/dist/server/types.d.ts +1 -1
- package/dist/server/types.d.ts.map +1 -1
- package/integration-tests/node_modules/.bin/vitest +2 -2
- package/integration-tests/src/mastra/agents/weather.ts +1 -1
- package/package.json +4 -4
- package/src/__fixtures__/weather.ts +1 -1
- package/src/server/server.ts +3 -2
- package/src/server/types.ts +1 -1
package/dist/index.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import $RefParser from '@apidevtools/json-schema-ref-parser';
|
|
2
2
|
import { MastraBase } from '@mastra/core/base';
|
|
3
3
|
import { MastraError, ErrorCategory, ErrorDomain } from '@mastra/core/error';
|
|
4
|
-
import { createTool
|
|
5
|
-
import { isZodType } from '@mastra/core/utils';
|
|
4
|
+
import { createTool } from '@mastra/core/tools';
|
|
5
|
+
import { makeCoreTool, isZodType } from '@mastra/core/utils';
|
|
6
6
|
import { Client } from '@modelcontextprotocol/sdk/client/index.js';
|
|
7
7
|
import { SSEClientTransport } from '@modelcontextprotocol/sdk/client/sse.js';
|
|
8
8
|
import { StdioClientTransport, getDefaultEnvironment } from '@modelcontextprotocol/sdk/client/stdio.js';
|
|
@@ -15,7 +15,6 @@ import { convertJsonSchemaToZod } from 'zod-from-json-schema';
|
|
|
15
15
|
import equal from 'fast-deep-equal';
|
|
16
16
|
import { v5 } from 'uuid';
|
|
17
17
|
import { randomUUID } from 'crypto';
|
|
18
|
-
import { createTool, makeCoreTool } from '@mastra/core';
|
|
19
18
|
import { MCPServerBase } from '@mastra/core/mcp';
|
|
20
19
|
import { RuntimeContext } from '@mastra/core/runtime-context';
|
|
21
20
|
import { Server } from '@modelcontextprotocol/sdk/server/index.js';
|
|
@@ -568,7 +567,7 @@ var InternalMastraMCPClient = class extends MastraBase {
|
|
|
568
567
|
for (const tool of tools) {
|
|
569
568
|
this.log("debug", `Processing tool: ${tool.name}`);
|
|
570
569
|
try {
|
|
571
|
-
const mastraTool = createTool
|
|
570
|
+
const mastraTool = createTool({
|
|
572
571
|
id: `${this.name}_${tool.name}`,
|
|
573
572
|
description: tool.description || "",
|
|
574
573
|
inputSchema: await this.convertInputSchema(tool.inputSchema),
|