# Get all HRIS toolshris_tools = toolset.get_tools('hris_*', account_id=account_id)# Get all ATS toolsats_tools = toolset.get_tools('ats_*', account_id=account_id)# Get specific list operationslist_tools = toolset.get_tools('hris_list_*', account_id=account_id)
# Get a specific toolemployee_tool = tools.get_tool('hris_list_employees')# Execute with parameters using call() methodemployees = employee_tool.call(limit=10, include_details=True)print(employees)
from stackone_ai.exceptions import StackOneError, ToolExecutionErrortry: result = employee_tool.call(id="employee-123") print("Success:", result)except ToolExecutionError as e: print(f"Tool execution failed: {e.message}")except StackOneError as e: print(f"StackOne API error: {e.message}")except Exception as e: print(f"Unexpected error: {e}")
# Get all available toolstools = toolset.get_tools('*', account_id=account_id)# List tool namestool_names = tools.list_tools()print('Available tools:', tool_names)# Get specific tool informationtool_info = tools.get_tool_info('hris_list_employees')print('Tool info:', tool_info)
import osfrom stackone_ai import StackOneToolSet# Set in your .env file# STACKONE_API_KEY=your_api_key# STACKONE_ACCOUNT_ID=your_account_idtoolset = StackOneToolSet( api_key=os.getenv('STACKONE_API_KEY'))# Use environment account ID as defaultaccount_id = os.getenv('STACKONE_ACCOUNT_ID') or 'fallback-account-id'