Skip to content

Commit ee73037

Browse files
fix: invalidate routing on add tool
1 parent bb8e740 commit ee73037

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

hud/environment/environment.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -182,6 +182,10 @@ def as_tools(self) -> list[mcp_types.Tool]:
182182

183183
return tools
184184

185+
def add_tool(self, obj: Any, **kwargs: Any) -> None:
186+
super().add_tool(obj, **kwargs)
187+
self._routing_built = False
188+
185189
async def call_tool(self, call: Any, /, **kwargs: Any) -> Any:
186190
"""Call a tool, auto-detecting format and returning matching result format.
187191

0 commit comments

Comments
 (0)