@aiwerk/mcp-bridge 2.8.14 → 2.8.16
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/src/mcp-router.js +5 -3
- package/package.json +1 -1
package/dist/src/mcp-router.js
CHANGED
|
@@ -108,11 +108,13 @@ export class McpRouter {
|
|
|
108
108
|
return this.error("mcp_error", "Catalog client not available");
|
|
109
109
|
}
|
|
110
110
|
try {
|
|
111
|
-
const
|
|
111
|
+
const searchResponse = await this.catalogClient.search(query);
|
|
112
|
+
// search() may return array or {results: [...]} depending on catalog API version
|
|
113
|
+
const results = Array.isArray(searchResponse) ? searchResponse : searchResponse.results || [];
|
|
112
114
|
return {
|
|
113
115
|
action: "search",
|
|
114
116
|
query,
|
|
115
|
-
results: results.map(r => ({
|
|
117
|
+
results: results.map((r) => ({
|
|
116
118
|
id: r.name,
|
|
117
119
|
name: r.name,
|
|
118
120
|
description: r.description || "",
|
|
@@ -131,7 +133,7 @@ export class McpRouter {
|
|
|
131
133
|
return this.error("mcp_error", "Catalog client not available");
|
|
132
134
|
}
|
|
133
135
|
try {
|
|
134
|
-
const recipeList = await this.catalogClient.list();
|
|
136
|
+
const recipeList = await this.catalogClient.list({ limit: 200 });
|
|
135
137
|
return {
|
|
136
138
|
action: "catalog",
|
|
137
139
|
recipes: recipeList.results.map(r => ({
|