@@ -36,7 +36,7 @@ def execute_action(
3636 """
3737 permissions = tools .get_permissions (execute_action )
3838 if not permissions .EXECUTE :
39- return "User has not granted execute permission."
39+ return { 'error' : "User has not granted execute permission." }
4040
4141 toolset = ComposioToolSet ()
4242 action = Action (action_name )
@@ -55,7 +55,7 @@ def get_action_schema(action_name: str) -> Dict[str, Any]:
5555 """Get the schema for a composio action."""
5656 permissions = tools .get_permissions (get_action_schema )
5757 if not permissions .READ :
58- return "User has not granted read permission."
58+ return { 'error' : "User has not granted read permission." }
5959
6060 toolset = ComposioToolSet ()
6161 action = Action (action_name )
@@ -70,7 +70,7 @@ def find_actions_by_use_case(
7070 """Find actions by use case."""
7171 permissions = tools .get_permissions (find_actions_by_use_case )
7272 if not permissions .READ :
73- return "User has not granted read permission."
73+ return [{ 'error' : "User has not granted read permission." }]
7474
7575 toolset = ComposioToolSet ()
7676 actions = toolset .find_actions_by_use_case (* apps , use_case = use_case )
@@ -84,7 +84,7 @@ def find_actions_by_tags(
8484 """Find actions by tags."""
8585 permissions = tools .get_permissions (find_actions_by_tags )
8686 if not permissions .READ :
87- return "User has not granted read permission."
87+ return [{ 'error' : "User has not granted read permission." }]
8888
8989 toolset = ComposioToolSet ()
9090 actions = toolset .find_actions_by_tags (* apps , tags = tags )
0 commit comments