@devries-cameron20 / composio Mirror · read-only / commits / e8fc4dd22
Fork 0

Composio powers 1000+ toolkits, tool search, context management, authentication, and a sandboxed workbench to help you build AI agents that turn intent into action.

Mirrored from https://github.com/Camo67/composio.git

Synced Nov 22, 22:00 UTC

fix: custom tools lookup before execution

angrybayblade committed Jul 15, 2025 at 15:22 UTC e8fc4dd22582301fe59fa2ea4b469f91dc8ed2bd
2 files changed +5 -1
python/composio/core/models/custom_tools.py
+1 -1
@@ -163,7 +163,7 @@ class CustomTools:
163 return None
164
165 @t.overload
166 - def register(self, f: t.Optional[CustomToolProtocol] = None) -> t.Callable: ...
166 + def register(self, f: CustomToolProtocol) -> CustomTool: ...
167
168 @t.overload
169 def register(
python/composio/core/models/tools.py
+4
@@ -354,6 +354,10 @@ class Tools(Resource, t.Generic[TProvider]):
354 :return: The response from the tool.
355 """
356 tool = self._tool_schemas.get(slug)
357 + if tool is None:
358 + tool = self._custom_tools[slug].info
359 + self._tool_schemas[slug] = tool
360 +
361 if tool is None:
362 tool = t.cast(Tool, self._client.tools.retrieve(tool_slug=slug))
363 self._tool_schemas[slug] = tool