Skip to content

Commit c869ca0

Browse files
committed
fix adhoc impl
1 parent 0f616f5 commit c869ca0

File tree

1 file changed

+4
-7
lines changed

1 file changed

+4
-7
lines changed

template_langgraph/tools/common.py

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
from template_langgraph.tools.sql_database_tool import SqlDatabaseClientWrapper
1010

1111
logger = get_logger(__name__)
12+
mcp_tools = McpClientWrapper().get_tools()
1213

1314

1415
def get_default_tools():
@@ -23,16 +24,12 @@ def get_default_tools():
2324
+ SqlDatabaseClientWrapper().get_tools(
2425
llm=AzureOpenAiWrapper().chat_model,
2526
)
26-
+ McpClientWrapper().get_tools()
27+
+ mcp_tools
2728
)
2829

2930

3031
def is_async_call_required(tool_name: str) -> bool:
31-
# FIXME: adhoc impl
32-
if tool_name.startswith("browser_"):
33-
return True
32+
mcp_tool_names = [tool.name for tool in mcp_tools]
3433
return tool_name in [
35-
"echo",
36-
"add",
37-
# add async tool names here
34+
*mcp_tool_names,
3835
]

0 commit comments

Comments
 (0)