onboarding
Initialize Serena's coding assistant by setting up required configuration and preferences to enable symbolic operations in large codebases.
Instructions
Call this tool if onboarding was not performed yet. You will call this tool at most once per conversation. Returns instructions on how to create the onboarding information.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Implementation Reference
- src/serena/tools/workflow_tools.py:40-54 (handler)The OnboardingTool class implements the core logic of the 'onboarding' tool by generating an onboarding prompt using the system's platform information.class OnboardingTool(Tool): """ Performs onboarding (identifying the project structure and essential tasks, e.g. for testing or building). """ def apply(self) -> str: """ Call this tool if onboarding was not performed yet. You will call this tool at most once per conversation. :return: instructions on how to create the onboarding information """ system = platform.system() return self.prompt_factory.create_onboarding_prompt(system=system)
- Helper method in the prompt factory that renders the specific 'onboarding_prompt' template, used by the onboarding tool handler.def create_onboarding_prompt(self, *, system: Any) -> str: return self._render_prompt("onboarding_prompt", locals())
- src/serena/tools/tools_base.py:118-128 (registration)Class method that derives the MCP tool name 'onboarding' from the class name 'OnboardingTool' by stripping 'Tool' and converting to snake_case.@classmethod def get_name_from_cls(cls) -> str: name = cls.__name__ if name.endswith("Tool"): name = name[:-4] # convert to snake_case name = "".join(["_" + c.lower() if c.isupper() else c for c in name]).lstrip("_") return name def get_name(self) -> str: return self.get_name_from_cls()
- src/serena/tools/tools_base.py:357-367 (registration)ToolRegistry automatically discovers all subclasses of Tool in the serena.tools package and registers them by their derived name, including 'onboarding' from OnboardingTool.def __init__(self) -> None: self._tool_dict: dict[str, RegisteredTool] = {} for cls in iter_subclasses(Tool): if not any(cls.__module__.startswith(pkg) for pkg in tool_packages): continue is_optional = issubclass(cls, ToolMarkerOptional) name = cls.get_name_from_cls() if name in self._tool_dict: raise ValueError(f"Duplicate tool name found: {name}. Tool classes must have unique names.") self._tool_dict[name] = RegisteredTool(tool_class=cls, is_optional=is_optional, tool_name=name)