@ai-sdk/mcp 1.0.72 → 1.0.74

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/dist/index.mjs CHANGED
@@ -2505,8 +2505,15 @@ var DefaultMCPClient = class {
2505
2505
  async tools({
2506
2506
  schemas = "automatic"
2507
2507
  } = {}) {
2508
- const definitions = await this.listTools();
2509
- return this.toolsFromDefinitions(definitions, {
2508
+ let definitions = await this.listTools();
2509
+ const tools = [...definitions.tools];
2510
+ while (definitions.nextCursor != null) {
2511
+ definitions = await this.listTools({
2512
+ params: { cursor: definitions.nextCursor }
2513
+ });
2514
+ tools.push(...definitions.tools);
2515
+ }
2516
+ return this.toolsFromDefinitions({ ...definitions, tools }, {
2510
2517
  schemas
2511
2518
  });
2512
2519
  }