Composio powers 1000+ toolkits, tool search, context management, authentication, and a sandboxed workbench to help you build AI agents that turn intent into action.
TypeScript agentic-aiagentsaiai-agentsaiagentsdeveloper-toolsfunction-callinggpt-4javascriptjsllmllmopsmcppythonremote-mcp-serverssetypescript
Make tools proxy fail if wrong params (#2052)
prateek65e4f94a1c22
diff --git a/python/composio/core/models/tools.py b/python/composio/core/models/tools.pyindex 444955905..3c5b7440a 100644--- a/python/composio/core/models/tools.py+++ b/python/composio/core/models/tools.py@@ -483,16 +483,28 @@ class Tools(Resource, t.Generic[TProvider]):return responsedef proxy(- self, **options: te.Unpack[tool_proxy_params.ToolProxyParams]+ self,+ endpoint: str,+ method: t.Literal["GET", "POST", "PUT", "DELETE", "PATCH", "HEAD"],+ body: t.Optional[object] = None,+ connected_account_id: t.Optional[str] = None,+ parameters: t.Optional[t.List[tool_proxy_params.Parameter]] = None,+ custom_connection_data: t.Optional[+ tool_proxy_params.CustomConnectionData+ ] = None,) -> tool_proxy_response.ToolProxyResponse:"""Proxy a tool call to the Composio API"""return self._client.tools.proxy(- endpoint=options["endpoint"],- method=options["method"],- body=options.get("body", omit),- connected_account_id=options.get("connected_account_id", omit),- parameters=options.get("parameters", omit),- custom_connection_data=options.get("custom_connection_data", omit),+ endpoint=endpoint,+ method=method,+ body=body if body is not None else omit,+ connected_account_id=connected_account_id+ if connected_account_id is not None+ else omit,+ parameters=parameters if parameters is not None else omit,+ custom_connection_data=custom_connection_data+ if custom_connection_data is not None+ else omit,)