File tree Expand file tree Collapse file tree 1 file changed +4
-2
lines changed
src/google/adk/tools/mcp_tool Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Original file line number Diff line number Diff line change 12
12
# See the License for the specific language governing permissions and
13
13
# limitations under the License.
14
14
15
+ from __future__ import annotations
16
+
15
17
from typing import Any
16
18
from typing import Dict
17
19
@@ -41,10 +43,10 @@ def adk_to_mcp_tool_type(tool: BaseTool) -> mcp_types.Tool:
41
43
print(mcp_tool)
42
44
"""
43
45
tool_declaration = tool ._get_declaration ()
44
- if not tool_declaration :
46
+ if not tool_declaration or not tool_declaration . parameters :
45
47
input_schema = {}
46
48
else :
47
- input_schema = gemini_to_json_schema (tool . _get_declaration () .parameters )
49
+ input_schema = gemini_to_json_schema (tool_declaration .parameters )
48
50
return mcp_types .Tool (
49
51
name = tool .name ,
50
52
description = tool .description ,
You can’t perform that action at this time.
0 commit comments