Skip to content

Commit eb88284

Browse files
committed
refactor: update get_component_schemas to use generic request method
1 parent 137da48 commit eb88284

1 file changed

Lines changed: 1 addition & 2 deletions

File tree

src/deepset_mcp/main.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,6 @@ async def get_pipeline(pipeline_id: str) -> dict[str, Any]:
8787

8888

8989
@mcp.tool()
90-
@async_to_sync
9190
async def get_component_schemas() -> dict[str, Any]:
9291
"""Retrieves the schemas for all available Haystack components from the deepset API.
9392
@@ -96,7 +95,7 @@ async def get_component_schemas() -> dict[str, Any]:
9695
"""
9796
try:
9897
async with DeepsetClient() as client:
99-
return await client.get_component_schemas()
98+
return await client.request("/haystack/components")
10099
except Exception as e:
101100
return {"error": str(e)}
102101

0 commit comments

Comments
 (0)