fetchTools() method enables this by fetching tool definitions at runtime based on the provided account IDs, rather than loading a static catalog.
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
fetchTools() 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).
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)