Skip to main content
Glama

think_about_whether_you_are_done

Check if you have completed the user's request by calling this tool to confirm task fulfillment before proceeding.

Instructions

Whenever you feel that you are done with what the user has asked for, it is important to call this tool.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • The handler implementation: subclass of Tool with apply() method that returns a generated prompt instructing the agent to think about task completion.
    class ThinkAboutWhetherYouAreDoneTool(Tool): """ Thinking tool for determining whether the task is truly completed. """ def apply(self) -> str: """ Whenever you feel that you are done with what the user has asked for, it is important to call this tool. """ return self.prompt_factory.create_think_about_whether_you_are_done()
  • ToolRegistry singleton automatically discovers and registers all Tool subclasses (including ThinkAboutWhetherYouAreDoneTool) from serena.tools modules by deriving tool names via get_name_from_cls().
    @singleton class ToolRegistry: 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)
  • Generated helper method in PromptFactory that renders the prompt template used by the tool's apply() method.
    def create_think_about_whether_you_are_done(self) -> str: return self._render_prompt("think_about_whether_you_are_done", locals())
  • Class method that derives the tool name 'think_about_whether_you_are_done' from the class name ThinkAboutWhetherYouAreDoneTool, used during registration.
    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

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