@ai-sdk/mcp 1.0.92 → 1.0.93

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 CHANGED
@@ -1,5 +1,11 @@
1
1
  # @ai-sdk/mcp
2
2
 
3
+ ## 1.0.93
4
+
5
+ ### Patch Changes
6
+
7
+ - d07f0d5: fix(mcp): allow MCP tools to execute without options
8
+
3
9
  ## 1.0.92
4
10
 
5
11
  ### 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, ToolExecutionOptions } from '@ai-sdk/provider-utils';
3
3
  import { JSONObject } from '@ai-sdk/provider';
4
4
 
5
5
  declare const JSONRPCRequestSchema: z.ZodObject<{
@@ -354,7 +354,8 @@ type ToolSchemas = Record<string, {
354
354
  outputSchema?: FlexibleSchema<JSONObject | unknown>;
355
355
  }> | 'automatic' | undefined;
356
356
  /** Base MCP tool type with execute and _meta */
357
- type McpToolBase<INPUT = unknown, OUTPUT = CallToolResult> = Tool<INPUT, OUTPUT> & Required<Pick<Tool<INPUT, OUTPUT>, 'execute'>> & {
357
+ type McpToolBase<INPUT = unknown, OUTPUT = CallToolResult> = Tool<INPUT, OUTPUT> & {
358
+ execute: (input: INPUT, options?: ToolExecutionOptions) => ReturnType<NonNullable<Tool<INPUT, OUTPUT>['execute']>>;
358
359
  _meta?: ToolMeta;
359
360
  };
360
361
  type McpToolSet<TOOL_SCHEMAS extends ToolSchemas = 'automatic'> = TOOL_SCHEMAS extends Record<string, {
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, ToolExecutionOptions } from '@ai-sdk/provider-utils';
3
3
  import { JSONObject } from '@ai-sdk/provider';
4
4
 
5
5
  declare const JSONRPCRequestSchema: z.ZodObject<{
@@ -354,7 +354,8 @@ type ToolSchemas = Record<string, {
354
354
  outputSchema?: FlexibleSchema<JSONObject | unknown>;
355
355
  }> | 'automatic' | undefined;
356
356
  /** Base MCP tool type with execute and _meta */
357
- type McpToolBase<INPUT = unknown, OUTPUT = CallToolResult> = Tool<INPUT, OUTPUT> & Required<Pick<Tool<INPUT, OUTPUT>, 'execute'>> & {
357
+ type McpToolBase<INPUT = unknown, OUTPUT = CallToolResult> = Tool<INPUT, OUTPUT> & {
358
+ execute: (input: INPUT, options?: ToolExecutionOptions) => ReturnType<NonNullable<Tool<INPUT, OUTPUT>['execute']>>;
358
359
  _meta?: ToolMeta;
359
360
  };
360
361
  type McpToolSet<TOOL_SCHEMAS extends ToolSchemas = 'automatic'> = TOOL_SCHEMAS extends Record<string, {