@ai-sdk/mcp 1.0.73 → 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/CHANGELOG.md +8 -0
- package/dist/index.js +9 -2
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +9 -2
- package/dist/index.mjs.map +1 -1
- package/package.json +2 -2
- package/src/tool/mcp-client.ts +11 -2
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ai-sdk/mcp",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.74",
|
|
4
4
|
"license": "Apache-2.0",
|
|
5
5
|
"sideEffects": false,
|
|
6
6
|
"main": "./dist/index.js",
|
|
@@ -35,7 +35,7 @@
|
|
|
35
35
|
"cross-spawn": "^7.0.6",
|
|
36
36
|
"pkce-challenge": "^5.0.0",
|
|
37
37
|
"@ai-sdk/provider": "3.0.15",
|
|
38
|
-
"@ai-sdk/provider-utils": "4.0.
|
|
38
|
+
"@ai-sdk/provider-utils": "4.0.48"
|
|
39
39
|
},
|
|
40
40
|
"devDependencies": {
|
|
41
41
|
"@types/cross-spawn": "^6.0.6",
|
package/src/tool/mcp-client.ts
CHANGED
|
@@ -903,8 +903,17 @@ class DefaultMCPClient implements MCPClient {
|
|
|
903
903
|
}: {
|
|
904
904
|
schemas?: TOOL_SCHEMAS;
|
|
905
905
|
} = {}): Promise<McpToolSet<TOOL_SCHEMAS>> {
|
|
906
|
-
|
|
907
|
-
|
|
906
|
+
let definitions = await this.listTools();
|
|
907
|
+
const tools = [...definitions.tools];
|
|
908
|
+
|
|
909
|
+
while (definitions.nextCursor != null) {
|
|
910
|
+
definitions = await this.listTools({
|
|
911
|
+
params: { cursor: definitions.nextCursor },
|
|
912
|
+
});
|
|
913
|
+
tools.push(...definitions.tools);
|
|
914
|
+
}
|
|
915
|
+
|
|
916
|
+
return this.toolsFromDefinitions({ ...definitions, tools }, {
|
|
908
917
|
schemas,
|
|
909
918
|
} as { schemas?: TOOL_SCHEMAS });
|
|
910
919
|
}
|