Skip to content

Commit 538c84f

Browse files
authored
feat(toolbox-core): Allow specifying protocol in sync client (#451)
* feat(toolbox-core): Allow specifying protocol in sync client * Update sync_client.py
1 parent 65a13ad commit 538c84f

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

packages/toolbox-core/src/toolbox_core/sync_client.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@
2020
from deprecated import deprecated
2121

2222
from .client import ToolboxClient
23+
from .protocol import Protocol
2324
from .sync_tool import ToolboxSyncTool
2425

2526

@@ -40,6 +41,7 @@ def __init__(
4041
client_headers: Optional[
4142
Mapping[str, Union[Callable[[], str], Callable[[], Awaitable[str]], str]]
4243
] = None,
44+
protocol: Protocol = Protocol.MCP,
4345
):
4446
"""
4547
Initializes the ToolboxSyncClient.
@@ -58,7 +60,7 @@ def __init__(
5860
self.__class__.__loop = loop
5961

6062
async def create_client():
61-
return ToolboxClient(url, client_headers=client_headers)
63+
return ToolboxClient(url, client_headers=client_headers, protocol=protocol)
6264

6365
self.__async_client = run_coroutine_threadsafe(
6466
create_client(), self.__class__.__loop

0 commit comments

Comments
 (0)