The Tool System
The Agent's hands — 43+ built-in tools
How Do Tools Work?
Basic Tool Structure
1class BaseTool(ABC):2 """Base class for all tools"""34 @property5 def name(self) -> str:6 """Tool name, e.g. 'Read', 'Bash'"""7 ...89 @property10 def description(self) -> str:11 """Tool description — how the LLM understands its capabilities"""12 ...1314 def get_input_schema(self) -> dict:15 """Parameter definition in JSON Schema format"""16 ...1718 async def execute(self, params, context) -> ToolResult:19 """Execute the tool, return the result"""20 ...
In OpenHarness, every tool inherits from BaseTool:
Tool Categories
Read file contents
FileWrite to a file
FileExact string replacement in files
FileSearch files by name pattern
FileSearch file contents (powered by ripgrep)
FileEdit Jupyter Notebook cells
FileExecute shell commands and return output
ShellFetch web page content
SearchSearch the internet for information
SearchSearch available deferred tools
SearchLaunch a sub-agent for complex tasks
AgentSend a message to a running agent
AgentCreate a new background task
TaskGet task status and details
TaskList all tasks
TaskUpdate task status
TaskStop a running task
TaskCall a tool on an MCP server
MCPList MCP resources
MCPRead MCP resource content
MCPEnter plan mode (read-only exploration)
WorkflowExit plan mode
WorkflowEnter an isolated Git worktree
WorkflowExit Git worktree
WorkflowLoad and execute a skill (domain knowledge)
MetaAsk the user a question for info
MetaCreate a scheduled task
ScheduleList scheduled tasks
ScheduleDelete a scheduled task
ScheduleThe Registry Pattern
1class ToolRegistry:2 """Tool Registry — unified management for all tools"""34 def register(self, tool: BaseTool):5 """Register a new tool"""6 self._tools[tool.name] = tool78 def get_tool(self, name: str) -> BaseTool:9 """Get a tool by name"""10 return self._tools[name]1112 def get_tool_schemas(self) -> list[dict]:13 """Get JSON Schemas for all tools (for the LLM to see)"""14 return [tool.to_json_schema() for tool in self._tools.values()]
All tools are managed through a unified registry: