Skip to content
Merged
Changes from 1 commit
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: 4 additions & 0 deletions src/nat/front_ends/mcp/mcp_front_end_plugin_worker.py
Original file line number Diff line number Diff line change
Expand Up @@ -234,6 +234,10 @@ async def add_routes(self, mcp: FastMCP, builder: WorkflowBuilder):
filtered_functions: dict[str, Function] = {}
for function_name, function in functions.items():
if function_name in self.front_end_config.tool_names:
# Treat current tool_names as function names, so check if the function name is in the list
filtered_functions[function_name] = function
elif any(function_name.startswith(f"{group_name}.") for group_name in self.front_end_config.tool_names):
# Treat tool_names as function group names, so check if the function name starts with the group name
filtered_functions[function_name] = function
else:
logger.debug("Skipping function %s as it's not in tool_names", function_name)
Expand Down