Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion packages/toolbox-core/src/toolbox_core/sync_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
from deprecated import deprecated

from .client import ToolboxClient
from .protocol import Protocol
from .sync_tool import ToolboxSyncTool


Expand All @@ -40,6 +41,7 @@ def __init__(
client_headers: Optional[
Mapping[str, Union[Callable[[], str], Callable[[], Awaitable[str]], str]]
] = None,
protocol: Protocol = Protocol.MCP,
):
"""
Initializes the ToolboxSyncClient.
Expand All @@ -58,7 +60,7 @@ def __init__(
self.__class__.__loop = loop

async def create_client():
return ToolboxClient(url, client_headers=client_headers)
return ToolboxClient(url, client_headers=client_headers, protocol=protocol)

self.__async_client = run_coroutine_threadsafe(
create_client(), self.__class__.__loop
Expand Down