Initialise the ToolSet
Start by creating a StackOneToolSet instance:Fetch Tools
UsefetchTools() to dynamically load tools from StackOne’s MCP endpoint:
fetchTools() pulls tool definitions at runtime based on your account IDs, reusing the credentials you already configured (e.g., via STACKONE_API_KEY). This is useful for multi-tenant applications where each customer has different integrations connected.
Advanced Filtering & Multi-Tenant
Advanced Filtering & Multi-Tenant
You can filter tools by account IDs, providers, and action patterns:This is useful when you want to:
- Limit tools to specific linked accounts
- Focus on specific providers
- Focus on specific action or operation types (e.g., all “list” operations, create, search, etc.)
Execute Tools
Basic Tool Execution
List Available Tools
Environment Configuration
Using Environment Variables
Example
Next Steps
- Build OpenAI agents with function calling
- Integrate with Vercel AI SDK for streaming
- Explore Tool Search for natural language tool discovery
- Learn advanced tool filtering patterns