@ai-sdk/mcp 0.0.39 → 0.0.41
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 +14 -0
- package/dist/index.d.mts +6 -2
- package/dist/index.d.ts +6 -2
- package/dist/index.js.map +1 -1
- package/dist/index.mjs.map +1 -1
- package/dist/mcp-stdio/index.js.map +1 -1
- package/dist/mcp-stdio/index.mjs.map +1 -1
- package/package.json +3 -3
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,19 @@
|
|
|
1
1
|
# @ai-sdk/mcp
|
|
2
2
|
|
|
3
|
+
## 0.0.41
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- Updated dependencies [d7b0ffa]
|
|
8
|
+
- Updated dependencies [4146790]
|
|
9
|
+
- @ai-sdk/provider-utils@3.0.42
|
|
10
|
+
|
|
11
|
+
## 0.0.40
|
|
12
|
+
|
|
13
|
+
### Patch Changes
|
|
14
|
+
|
|
15
|
+
- c87913e: fix(mcp): allow MCP tools to execute without options
|
|
16
|
+
|
|
3
17
|
## 0.0.39
|
|
4
18
|
|
|
5
19
|
### Patch Changes
|
package/dist/index.d.mts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { z } from 'zod/v4';
|
|
2
|
-
import { FetchFunction, FlexibleSchema, Tool } from '@ai-sdk/provider-utils';
|
|
2
|
+
import { FetchFunction, FlexibleSchema, Tool, ToolCallOptions } from '@ai-sdk/provider-utils';
|
|
3
3
|
import { JSONObject } from '@ai-sdk/provider';
|
|
4
4
|
|
|
5
5
|
declare const JSONRPCRequestSchema: z.ZodObject<{
|
|
@@ -245,12 +245,16 @@ type MCPTransportConfig = {
|
|
|
245
245
|
type ToolSchemas = Record<string, {
|
|
246
246
|
inputSchema: FlexibleSchema<JSONObject | unknown>;
|
|
247
247
|
}> | 'automatic' | undefined;
|
|
248
|
+
/** Base MCP tool type with execute */
|
|
249
|
+
type McpToolBase<INPUT = unknown, OUTPUT = CallToolResult> = Tool<INPUT, OUTPUT> & {
|
|
250
|
+
execute: (input: INPUT, options?: ToolCallOptions) => ReturnType<NonNullable<Tool<INPUT, OUTPUT>['execute']>>;
|
|
251
|
+
};
|
|
248
252
|
type McpToolSet<TOOL_SCHEMAS extends ToolSchemas = 'automatic'> = TOOL_SCHEMAS extends Record<string, {
|
|
249
253
|
inputSchema: FlexibleSchema<any>;
|
|
250
254
|
}> ? {
|
|
251
255
|
[K in keyof TOOL_SCHEMAS]: TOOL_SCHEMAS[K] extends {
|
|
252
256
|
inputSchema: FlexibleSchema<infer INPUT>;
|
|
253
|
-
} ?
|
|
257
|
+
} ? McpToolBase<INPUT, CallToolResult> : never;
|
|
254
258
|
} : McpToolSet<Record<string, {
|
|
255
259
|
inputSchema: FlexibleSchema<unknown>;
|
|
256
260
|
}>>;
|
package/dist/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { z } from 'zod/v4';
|
|
2
|
-
import { FetchFunction, FlexibleSchema, Tool } from '@ai-sdk/provider-utils';
|
|
2
|
+
import { FetchFunction, FlexibleSchema, Tool, ToolCallOptions } from '@ai-sdk/provider-utils';
|
|
3
3
|
import { JSONObject } from '@ai-sdk/provider';
|
|
4
4
|
|
|
5
5
|
declare const JSONRPCRequestSchema: z.ZodObject<{
|
|
@@ -245,12 +245,16 @@ type MCPTransportConfig = {
|
|
|
245
245
|
type ToolSchemas = Record<string, {
|
|
246
246
|
inputSchema: FlexibleSchema<JSONObject | unknown>;
|
|
247
247
|
}> | 'automatic' | undefined;
|
|
248
|
+
/** Base MCP tool type with execute */
|
|
249
|
+
type McpToolBase<INPUT = unknown, OUTPUT = CallToolResult> = Tool<INPUT, OUTPUT> & {
|
|
250
|
+
execute: (input: INPUT, options?: ToolCallOptions) => ReturnType<NonNullable<Tool<INPUT, OUTPUT>['execute']>>;
|
|
251
|
+
};
|
|
248
252
|
type McpToolSet<TOOL_SCHEMAS extends ToolSchemas = 'automatic'> = TOOL_SCHEMAS extends Record<string, {
|
|
249
253
|
inputSchema: FlexibleSchema<any>;
|
|
250
254
|
}> ? {
|
|
251
255
|
[K in keyof TOOL_SCHEMAS]: TOOL_SCHEMAS[K] extends {
|
|
252
256
|
inputSchema: FlexibleSchema<infer INPUT>;
|
|
253
|
-
} ?
|
|
257
|
+
} ? McpToolBase<INPUT, CallToolResult> : never;
|
|
254
258
|
} : McpToolSet<Record<string, {
|
|
255
259
|
inputSchema: FlexibleSchema<unknown>;
|
|
256
260
|
}>>;
|