Skip to main content
Glama

onboarding

Initiate user onboarding for the Serena MCP server by generating instructions to create necessary onboarding information. Use this tool once per conversation to ensure proper setup.

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
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • The OnboardingTool class is the core handler for the 'onboarding' tool. Its apply method generates platform-specific onboarding instructions by calling the prompt factory.
    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)
  • Supporting helper method in the generated prompt factory that renders the 'onboarding_prompt' template with system information.
    def create_onboarding_prompt(self, *, system: Any) -> str: return self._render_prompt("onboarding_prompt", locals())
  • ToolRegistry automatically discovers and registers all subclasses of Tool in serena.tools modules, including OnboardingTool, mapping class names to tool names like 'onboarding'.
    @singleton class ToolRegistry: def __init__(self) -> None: self._tool_dict: dict[str, RegisteredTool] = {} for cls in iter_subclasses(Tool): if not cls.__module__.startswith("serena.tools"): 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) def get_tool_class_by_name(self, tool_name: str) -> type[Tool]: return self._tool_dict[tool_name].tool_class def get_all_tool_classes(self) -> list[type[Tool]]: return list(t.tool_class for t in self._tool_dict.values()) def get_tool_classes_default_enabled(self) -> list[type[Tool]]: """ :return: the list of tool classes that are enabled by default (i.e. non-optional tools). """ return [t.tool_class for t in self._tool_dict.values() if not t.is_optional] def get_tool_classes_optional(self) -> list[type[Tool]]: """ :return: the list of tool classes that are optional (i.e. disabled by default). """ return [t.tool_class for t in self._tool_dict.values() if t.is_optional] def get_tool_names_default_enabled(self) -> list[str]: """ :return: the list of tool names that are enabled by default (i.e. non-optional tools). """ return [t.tool_name for t in self._tool_dict.values() if not t.is_optional] def get_tool_names_optional(self) -> list[str]: """ :return: the list of tool names that are optional (i.e. disabled by default). """ return [t.tool_name for t in self._tool_dict.values() if t.is_optional] def get_tool_names(self) -> list[str]: """ :return: the list of all tool names. """ return list(self._tool_dict.keys()) def print_tool_overview( self, tools: Iterable[type[Tool] | Tool] | None = None, include_optional: bool = False, only_optional: bool = False ) -> None: """ Print a summary of the tools. If no tools are passed, a summary of the selection of tools (all, default or only optional) is printed. """ if tools is None: if only_optional: tools = self.get_tool_classes_optional() elif include_optional: tools = self.get_all_tool_classes() else: tools = self.get_tool_classes_default_enabled() tool_dict: dict[str, type[Tool] | Tool] = {} for tool_class in tools: tool_dict[tool_class.get_name_from_cls()] = tool_class for tool_name in sorted(tool_dict.keys()): tool_class = tool_dict[tool_name] print(f" * `{tool_name}`: {tool_class.get_tool_description().strip()}") def is_valid_tool_name(self, tool_name: str) -> bool: return tool_name in self._tool_dict
  • Related handler CheckOnboardingPerformedTool that checks if onboarding has been done and instructs to call the 'onboarding' tool if not.
    class CheckOnboardingPerformedTool(Tool): """ Checks whether project onboarding was already performed. """ def apply(self) -> str: """ Checks whether project onboarding was already performed. You should always call this tool before beginning to actually work on the project/after activating a project. """ from .memory_tools import ListMemoriesTool list_memories_tool = self.agent.get_tool(ListMemoriesTool) memories = json.loads(list_memories_tool.apply()) if len(memories) == 0: return ( "Onboarding not performed yet (no memories available). " + "You should perform onboarding by calling the `onboarding` tool before proceeding with the task." ) else: return f"""The onboarding was already performed, below is the list of available memories. Do not read them immediately, just remember that they exist and that you can read them later, if it is necessary for the current task. Some memories may be based on previous conversations, others may be general for the current project. You should be able to tell which one you need based on the name of the memory. {memories}"""

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/oraios/serena'

If you have feedback or need assistance with the MCP directory API, please join our Discord server