Available tool types
watsonx Orchestrate supports the following tool types:- Standalone Python tools: Individual Python tools that run in isolated processes
- Python toolkits: Groups of related Python tools that run together in a single Python process
- Local MCP toolkits: MCP servers (Python or Node.js) that run inside the watsonx Orchestrate runtime
- Remote MCP toolkits: MCP servers hosted externally that watsonx Orchestrate connects to via HTTP
- OpenAPI tools: REST API endpoints defined by OpenAPI specifications
Decision framework
Use this decision tree to identify the best tool type for your needs:Detailed comparison
Standalone Python tools
Use when:- You have a single, independent tool
- The tool uses non-thread-safe operations (file I/O, global state, etc.)
- You need process isolation between tool invocations
- You’re prototyping or testing a new tool
- Each tool invocation starts a lightweight Python process
- Full process isolation ensures no state leakage between calls
- Supports non-thread-safe operations without modification
- Higher execution overhead due to process startup
- Simpler to develop and debug
- Draft environment: Runs in shared container per tenant (2 vCPUs, 2 GB memory, 5 workers)
- Live environment: Same shared container model
- Process overhead: ~100-300ms per invocation for process startup
- Tools that write to temporary files
- Tools using libraries with global state
- Infrequently called tools where startup overhead is acceptable
- Prototype tools during development
Python toolkits
Use when:- You have multiple related Python tools
- All tools are thread-safe and reentrant
- You expect high concurrency or frequent tool calls
- You want to minimize execution overhead
- Groups related tools in a single Python process
- Tools share the same process and can share dependencies
- Requires all tools to be thread-safe
- Significantly faster execution (no process startup overhead)
- Tools deploy and update together as a unit
- Draft environment: Runs in shared container per tenant (2 vCPUs, 2 GB memory, 5 workers)
- Live premium environment: Each toolkit gets dedicated container (2 vCPUs, 2 GB memory, 5 workers, 2 replicas)
- Process overhead: None after initial startup
- Concurrency: Up to 5 concurrent requests per toolkit
- Suite of data transformation tools
- Multiple tools accessing the same API or service
- High-frequency tools called repeatedly by agents
- Tools sharing common utility functions or dependencies
- All tools must be thread-safe
- No global mutable state
- No file system writes (read-only filesystem)
- Proper async/await patterns for I/O operations
Local MCP toolkits
Use when:- You have existing MCP servers (Python or Node.js)
- You want to use Node.js for tool development
- You need the MCP protocol’s features (resources, prompts, etc.)
- You want to share tools across multiple AI platforms
- Runs MCP servers inside watsonx Orchestrate runtime
- Supports both Python and Node.js implementations
- Can import from npm, PyPI, or local filesystem
- Behaves like standalone Python tools (process per invocation)
- Full MCP protocol support
- Similar to standalone Python tools
- Process startup overhead per invocation
- Supports stdio transport only (local execution)
- Existing MCP servers you want to reuse
- Node.js-based tools
- Tools that need MCP resources or prompts
- Cross-platform tool sharing
Remote MCP toolkits
Use when:- Tools must run in external infrastructure
- You need to integrate cloud services or third-party APIs
- You want centralized tool management across multiple Orchestrate instances
- You have existing remote MCP servers
- MCP server runs externally (your infrastructure or third-party)
- watsonx Orchestrate connects via HTTP (SSE or streamable HTTP)
- Supports multiple authentication methods
- Network latency added to each tool call
- Centralized updates without redeploying to Orchestrate
- Network latency: typically 50-200ms per call
- Depends on remote server’s performance
- No local resource consumption
- Integration with cloud services (AWS, Azure, GCP)
- Third-party MCP servers (GitHub Copilot, CoinGecko, etc.)
- Tools requiring specialized infrastructure
- Centrally managed tools used by multiple tenants
OpenAPI tools
Use when:- You have existing REST APIs
- You want to expose HTTP endpoints as tools
- You don’t need custom Python logic
- You want declarative tool definitions
- Defined by OpenAPI specifications
- No custom code required
- Automatic schema validation
- Supports various authentication methods
- Direct HTTP calls to your APIs
- Network latency depends on API location
- No local processing overhead
- Scales with your API infrastructure
- Existing microservices or REST APIs
- Third-party API integrations
- CRUD operations on databases
- Webhook-based integrations
Performance considerations
Execution overhead comparison
| Tool Type | Process Startup | Network Latency | Best For |
|---|---|---|---|
| Standalone Python tool | ~100-300ms | None | Low-frequency calls |
| Python toolkit | None (after init) | None | High-frequency calls |
| Local MCP toolkit | ~100-300ms | None | Node.js or MCP features |
| Remote MCP toolkit | Minimal | 50-200ms | External services |
| OpenAPI tool | None | 50-200ms | REST APIs |
Concurrency and scaling
Python toolkits (live premium):- 5 workers per toolkit
- 2 replicas per toolkit
- Up to 10 concurrent requests per toolkit
- Dedicated resources (2 vCPUs, 2 GB per toolkit)
- Share tenant-wide container
- 5 workers total across all tools
- 2 replicas
- Suitable for moderate concurrency
- Scaling depends on remote server
- No local resource limits
- Network becomes the bottleneck
Thread safety requirements
What makes a tool thread-safe?
A tool is thread-safe when multiple threads can call it concurrently without causing race conditions or data corruption. Thread-safe patterns:Making tools thread-safe
If your tool has non-thread-safe operations:- Remove global mutable state: Use function parameters instead
- Use thread-safe libraries: Check library documentation
- Add synchronization: Use
asyncio.Lock()for critical sections - Keep as standalone tool: If thread-safety is too complex
Migration scenarios
From standalone Python tool to Python toolkit
When to migrate:- Tool is called frequently (>10 times per minute)
- You have multiple related tools
- You’ve verified thread-safety
- You want better performance in live environment
- Verify all tools are thread-safe
- Create toolkit folder structure
- Move tool files into toolkit
- Update imports if needed
- Import as toolkit
- Test in draft environment
- Update agents to use
toolkit_name:tool_nameformat - Deploy to live environment
From Python toolkit to standalone tools
When to migrate:- Discovering thread-safety issues in production
- Tools are called infrequently
- Tools have conflicting dependencies
- Need independent tool updates
- Export each tool from toolkit
- Import each as standalone tool
- Update agent configurations
- Test thoroughly
- Remove old toolkit
From local MCP to Python toolkit
When to migrate:- Want better performance (eliminate process overhead)
- Don’t need MCP-specific features
- Tools are Python-based and thread-safe
- Want dedicated resources in live environment
- Extract Python code from MCP server
- Convert to
@tooldecorated functions - Ensure thread-safety
- Import as Python toolkit
- Update agent configurations
- Test and validate
Choosing based on ownership and dependencies
Shared dependencies
Use Python toolkit when:- Multiple tools use the same libraries
- Dependencies are large (reduces memory usage)
- Tools need to share utility functions
- Tools have conflicting dependency versions
- Each tool has unique dependencies
- You want independent dependency updates
Ownership boundaries
Use separate toolkits when:- Different teams own different tools
- Tools have different update schedules
- You want independent deployment
- One team owns all tools
- Tools are tightly coupled
- You want atomic updates
Environment-specific considerations
Draft environment
- All Python toolkits and tools share one container per tenant
- Process overhead exists for all tool types
- Good for testing and development
- Resource limits: 2 vCPUs, 2 GB memory, 5 workers
Live environment (premium)
- Each Python toolkit gets dedicated container
- No process overhead for toolkit tools
- Better isolation and performance
- Up to 5 toolkits per tenant
Live environment (non-premium)
- Similar to draft environment
- Shared container model
- Contact support for toolkit access
Best practices summary
- Start simple: Begin with standalone Python tools during development
- Measure performance: Profile your tools to identify bottlenecks
- Group related tools: Bundle tools that share dependencies or are called together
- Ensure thread-safety: Test thoroughly before using Python toolkits
- Use async patterns: Always use
async/awaitfor I/O operations - Monitor concurrency: Track concurrent requests to avoid worker exhaustion
- Plan for scaling: Consider expected load when choosing tool type
- Document dependencies: Clearly specify shared dependencies in toolkits

