Skip to content

Commit 0c996cf

Browse files
fix(mcp): v2 API Spec loading (#262)
1 parent 40bbf7c commit 0c996cf

File tree

1 file changed

+2
-8
lines changed

1 file changed

+2
-8
lines changed

cloudsmith_cli/core/mcp/server.py

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -209,16 +209,10 @@ async def load_openapi_spec(self):
209209
) as http_client:
210210
for version, endpoint in API_VERSIONS_TO_DISCOVER.items():
211211
spec_url = f"{self.api_base_url}/{version}/{endpoint}"
212-
try:
213-
response = await http_client.get(spec_url)
214-
response.raise_for_status()
215-
except httpx.HTTPStatusError:
216-
# This version is not available, try the next one
217-
continue
212+
response = await http_client.get(spec_url)
213+
response.raise_for_status()
218214
self.spec = response.json()
219215
await self._generate_tools_from_spec()
220-
# Stop after the first successful spec load to avoid duplicate tools
221-
break
222216

223217
def _get_tool_groups(self, tool_name: str) -> List[str]:
224218
"""

0 commit comments

Comments
 (0)