Custom Tools
Extend SciLaxy's capabilities by building custom tools. Tools can be added as builtin Python functions or provided externally via MCP servers.
Tool Architecture
Tools in SciLaxy follow the LangChain tool interface. Each tool has:
- Name — Unique identifier used by the LLM to call the tool
- Description — Explains what the tool does (used by the LLM to decide when to use it)
- Schema — Input parameters with types and descriptions
- Implementation — The function that executes when the tool is called
Building a Builtin Tool
Builtin tools are Python functions in service/app/tools/. Here's the structure:
Tool with Schemas
For complex input parameters, define a Pydantic schema:
Tool Registration
Tools are registered in the tool preparation step (service/app/tools/prepare.py). Add your tool to the tool list so agents can discover and use it:
After registration, the tool appears in the agent configuration UI and can be enabled per-agent.
Dynamic Tools via MCP
For tools that don't need to be part of the SciLaxy codebase, use MCP servers. This is the recommended approach for:
- Third-party API integrations
- User-specific tools
- Tools that change frequently
- Tools developed by external teams
See MCP Servers for details on connecting external tool providers.