@ai-sdk/mcp 2.0.35 → 2.0.37

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,22 @@
1
1
  # @ai-sdk/mcp
2
2
 
3
+ ## 2.0.37
4
+
5
+ ### Patch Changes
6
+
7
+ - 1175434: Fetch all paginated tool definitions when creating an MCP tool set.
8
+ - Updated dependencies [591d25b]
9
+ - @ai-sdk/provider@4.0.8
10
+ - @ai-sdk/provider-utils@5.0.30
11
+
12
+ ## 2.0.36
13
+
14
+ ### Patch Changes
15
+
16
+ - b352a6a: fix(mcp): support spawning command shims such as `npx` on Windows
17
+ - Updated dependencies [b74971f]
18
+ - @ai-sdk/provider-utils@5.0.29
19
+
3
20
  ## 2.0.35
4
21
 
5
22
  ### Patch Changes
package/dist/index.js CHANGED
@@ -3051,8 +3051,15 @@ var DefaultMCPClient = class {
3051
3051
  async tools({
3052
3052
  schemas = "automatic"
3053
3053
  } = {}) {
3054
- const definitions = await this.listTools();
3055
- return this.toolsFromDefinitions(definitions, {
3054
+ let definitions = await this.listTools();
3055
+ const tools = [...definitions.tools];
3056
+ while (definitions.nextCursor != null) {
3057
+ definitions = await this.listTools({
3058
+ params: { cursor: definitions.nextCursor }
3059
+ });
3060
+ tools.push(...definitions.tools);
3061
+ }
3062
+ return this.toolsFromDefinitions({ ...definitions, tools }, {
3056
3063
  schemas
3057
3064
  });
3058
3065
  }