@ai-sdk/mcp 0.0.28 → 0.0.31

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
@@ -1880,8 +1880,15 @@ var DefaultMCPClient = class {
1880
1880
  var _a3;
1881
1881
  const tools = {};
1882
1882
  try {
1883
- const listToolsResult = await this.listTools();
1884
- for (const { name: name3, description, inputSchema } of listToolsResult.tools) {
1883
+ let listToolsResult = await this.listTools();
1884
+ const toolDefinitions = [...listToolsResult.tools];
1885
+ while (listToolsResult.nextCursor != null) {
1886
+ listToolsResult = await this.listTools({
1887
+ params: { cursor: listToolsResult.nextCursor }
1888
+ });
1889
+ toolDefinitions.push(...listToolsResult.tools);
1890
+ }
1891
+ for (const { name: name3, description, inputSchema } of toolDefinitions) {
1885
1892
  if (schemas !== "automatic" && !Object.prototype.hasOwnProperty.call(schemas, name3)) {
1886
1893
  continue;
1887
1894
  }