fetch_tools() method enables this by fetching tool definitions at runtime based on the provided account IDs, rather than loading a static catalogue.
This is particularly useful for:
- Multi-tenant applications: Each customer may have different integrations connected
- AI agents: Provide only the tools that are actually available for the current user’s connected accounts
- Runtime flexibility: Tool availability adapts automatically as integrations are added or removed
Basic Usage
fetch_tools() pulls the current tool definitions directly from StackOne based on your account IDs, reusing the credentials you already configured (e.g., via STACKONE_API_KEY).
Note: Install the optional extra (pip install 'stackone-ai[mcp]') on Python 3.10+ to enable dynamic discovery.
Filtering Tools
You can filter tools by account IDs, providers, and action patterns:- Limit tools to specific linked accounts
- Focus on specific HR/CRM/ATS providers
- Get only certain types of operations (e.g., all “list” operations)