File tree Expand file tree Collapse file tree 5 files changed +29
-20
lines changed
Expand file tree Collapse file tree 5 files changed +29
-20
lines changed Original file line number Diff line number Diff line change @@ -67,27 +67,23 @@ You can explicitly select a protocol using the `protocol` option during toolset
6767| Constant | Description |
6868| :--- | :--- |
6969| ` Protocol.MCP ` | ** (Default)** Alias for the default MCP version (currently ` 2025-06-18 ` ). |
70- | ` Protocol.TOOLBOX ` | ** DEPRECATED** : The native Toolbox HTTP protocol. Will be removed on March 4, 2026. |
7170| ` Protocol.MCP_v20251125 ` | MCP Protocol version 2025-11-25. |
7271| ` Protocol.MCP_v20250618 ` | MCP Protocol version 2025-06-18. |
7372| ` Protocol.MCP_v20250326 ` | MCP Protocol version 2025-03-26. |
7473| ` Protocol.MCP_v20241105 ` | MCP Protocol version 2024-11-05. |
7574
7675> [ !WARNING]
77- > The ** Native Toolbox Protocol** (` Protocol.TOOLBOX ` ) is deprecated and will be removed on ** March 4, 2026** .
78- > Please migrate to using the ** MCP Protocol** (` Protocol.MCP ` ), which is the default.
7976
8077### Example
8178
82- If you wish to use the native Toolbox protocol:
8379
8480``` python
8581from toolbox_adk import ToolboxToolset
8682from toolbox_core.protocol import Protocol
8783
8884toolset = ToolboxToolset(
8985 server_url = " http://127.0.0.1:5000" ,
90- protocol = Protocol.TOOLBOX
86+ protocol = Protocol.MCP
9187)
9288```
9389
Original file line number Diff line number Diff line change @@ -160,24 +160,20 @@ You can explicitly select a protocol using the `protocol` option during client i
160160| Constant | Description |
161161| :--- | :--- |
162162| ` Protocol.MCP ` | ** (Default)** Alias for the default MCP version (currently ` 2025-06-18 ` ). |
163- | ` Protocol.TOOLBOX ` | ** DEPRECATED** : The native Toolbox HTTP protocol. Will be removed on March 4, 2026. |
164163| ` Protocol.MCP_v20251125 ` | MCP Protocol version 2025-11-25. |
165164| ` Protocol.MCP_v20250618 ` | MCP Protocol version 2025-06-18. |
166165| ` Protocol.MCP_v20241105 ` | MCP Protocol version 2024-11-05. |
167166
168167> [ !WARNING]
169- > The ** Native Toolbox Protocol** (` Protocol.TOOLBOX ` ) is deprecated and will be removed on ** March 4, 2026** .
170- > Please migrate to using the ** MCP Protocol** (` Protocol.MCP ` ), which is the default.
171168
172169### Example
173170
174- If you wish to use the native Toolbox protocol:
175171
176172``` py
177173from toolbox_core import ToolboxClient
178174from toolbox_core.protocol import Protocol
179175
180- async with ToolboxClient(" http://127.0.0.1:5000" , protocol = Protocol.TOOLBOX ) as toolbox:
176+ async with ToolboxClient(" http://127.0.0.1:5000" , protocol = Protocol.MCP ) as toolbox:
181177 # Use client
182178 pass
183179```
Original file line number Diff line number Diff line change 3535TEST_TOOL_NAME = "sample_tool"
3636
3737
38+ class MockTransport (ITransport ):
39+ def __init__ (self , base_url , session = None ):
40+ self ._base_url = base_url
41+ self .tool_invoke_mock = AsyncMock ()
42+ self .tool_get_mock = AsyncMock ()
43+ self .tools_list_mock = AsyncMock ()
44+ self .close_mock = AsyncMock ()
45+
46+ @property
47+ def base_url (self ):
48+ return self ._base_url
49+
50+ async def tool_invoke (self , * args , ** kwargs ):
51+ return await self .tool_invoke_mock (* args , ** kwargs )
52+
53+ async def tool_get (self , * args , ** kwargs ):
54+ return await self .tool_get_mock (* args , ** kwargs )
55+
56+ async def tools_list (self , * args , ** kwargs ):
57+ return await self .tools_list_mock (* args , ** kwargs )
58+
59+ async def close (self , * args , ** kwargs ):
60+ return await self .close_mock (* args , ** kwargs )
61+
62+
3863class MockTransport (ITransport ):
3964 def __init__ (self , base_url , session = None ):
4065 self ._base_url = base_url
Original file line number Diff line number Diff line change @@ -107,25 +107,21 @@ You can explicitly select a protocol using the `protocol` option during client i
107107| Constant | Description |
108108| :--- | :--- |
109109| ` Protocol.MCP ` | ** (Default)** Alias for the default MCP version (currently ` 2025-06-18 ` ). |
110- | ` Protocol.TOOLBOX ` | ** DEPRECATED** : The native Toolbox HTTP protocol. Will be removed on March 4, 2026. |
111110| ` Protocol.MCP_v20251125 ` | MCP Protocol version 2025-11-25. |
112111| ` Protocol.MCP_v20250618 ` | MCP Protocol version 2025-06-18. |
113112| ` Protocol.MCP_v20250326 ` | MCP Protocol version 2025-03-26. |
114113| ` Protocol.MCP_v20241105 ` | MCP Protocol version 2024-11-05. |
115114
116115> [ !WARNING]
117- > The ** Native Toolbox Protocol** (` Protocol.TOOLBOX ` ) is deprecated and will be removed on ** March 4, 2026** .
118- > Please migrate to using the ** MCP Protocol** (` Protocol.MCP ` ), which is the default.
119116
120117### Example
121118
122- If you wish to use the native Toolbox protocol:
123119
124120``` py
125121from toolbox_langchain import ToolboxClient
126122from toolbox_core.protocol import Protocol
127123
128- async with ToolboxClient(" http://127.0.0.1:5000" , protocol = Protocol.TOOLBOX ) as toolbox:
124+ async with ToolboxClient(" http://127.0.0.1:5000" , protocol = Protocol.MCP ) as toolbox:
129125 # Use client
130126 pass
131127```
Original file line number Diff line number Diff line change @@ -111,25 +111,21 @@ You can explicitly select a protocol using the `protocol` option during client i
111111| Constant | Description |
112112| :--- | :--- |
113113| ` Protocol.MCP ` | ** (Default)** Alias for the default MCP version (currently ` 2025-06-18 ` ). |
114- | ` Protocol.TOOLBOX ` | ** DEPRECATED** : The native Toolbox HTTP protocol. Will be removed on March 4, 2026. |
115114| ` Protocol.MCP_v20251125 ` | MCP Protocol version 2025-11-25. |
116115| ` Protocol.MCP_v20250618 ` | MCP Protocol version 2025-06-18. |
117116| ` Protocol.MCP_v20250326 ` | MCP Protocol version 2025-03-26. |
118117| ` Protocol.MCP_v20241105 ` | MCP Protocol version 2024-11-05. |
119118
120119> [ !WARNING]
121- > The ** Native Toolbox Protocol** (` Protocol.TOOLBOX ` ) is deprecated and will be removed on ** March 4, 2026** .
122- > Please migrate to using the ** MCP Protocol** (` Protocol.MCP ` ), which is the default.
123120
124121### Example
125122
126- If you wish to use the native Toolbox protocol:
127123
128124``` py
129125from toolbox_llamaindex import ToolboxClient
130126from toolbox_core.protocol import Protocol
131127
132- async with ToolboxClient(" http://127.0.0.1:5000" , protocol = Protocol.TOOLBOX ) as toolbox:
128+ async with ToolboxClient(" http://127.0.0.1:5000" , protocol = Protocol.MCP ) as toolbox:
133129 # Use client
134130 pass
135131```
You can’t perform that action at this time.
0 commit comments