Files
OpenJarvis/docs/api/tools.md
T
Jon Saad-FalconandClaude Opus 4.6 852259f18b Restructure codebase into 5-pillar architecture with MCP tool management, composition layer, and structured learning
Phase 1: Move RoutingContext to core/types.py, add RouterPolicy and QueryAnalyzer ABCs to intelligence/_stubs.py
Phase 2: Move memory backends to tools/storage/, convert memory/ to backward-compat shims
Phase 3: Add MCPToolAdapter, storage MCP tools, upgrade MCP server to spec 2025-11-25
Phase 4: Add SystemBuilder + JarvisSystem composition layer (system.py)
Phase 5: Add InstrumentedEngine for opt-in telemetry, simplify all agents
Phase 6: Add LearningPolicy ABC taxonomy with SFTPolicy, AgentAdvisorPolicy, ICLUpdaterPolicy
Phase 7: Update config schema (ToolsConfig, MCPConfig, TracesConfig, per-pillar learning policies)

Also: update all docs, README (DSPy-inspired), CLAUDE.md, and add logo assets.
1391 tests pass, 32 skipped. Zero new lint errors. Full backward compatibility via shims.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-22 05:57:13 +00:00

2.7 KiB

Tools Module

The tools module implements the tool system used by agents for executing actions such as calculations, memory search, file reading, and sub-model queries. Each tool implements the BaseTool ABC and is registered via @ToolRegistry.register("name"). The ToolExecutor dispatches tool calls with JSON argument parsing, latency tracking, and event bus integration.

Abstract Base Class

BaseTool

::: openjarvis.tools._stubs.BaseTool options: show_source: true members_order: source

ToolSpec

::: openjarvis.tools._stubs.ToolSpec options: show_source: true members_order: source

ToolExecutor

::: openjarvis.tools._stubs.ToolExecutor options: show_source: true members_order: source


Built-in Tools

CalculatorTool

::: openjarvis.tools.calculator.CalculatorTool options: show_source: true members_order: source

safe_eval

::: openjarvis.tools.calculator.safe_eval options: show_source: true

ThinkTool

::: openjarvis.tools.think.ThinkTool options: show_source: true members_order: source

RetrievalTool

::: openjarvis.tools.retrieval.RetrievalTool options: show_source: true members_order: source

LLMTool

::: openjarvis.tools.llm_tool.LLMTool options: show_source: true members_order: source

FileReadTool

::: openjarvis.tools.file_read.FileReadTool options: show_source: true members_order: source


Storage Tools

Tools that expose memory storage operations for use by agents via the tool system. These wrap the memory backend methods as BaseTool implementations.

MemoryStoreTool

::: openjarvis.tools.storage_tools.MemoryStoreTool options: show_source: true members_order: source

MemoryRetrieveTool

::: openjarvis.tools.storage_tools.MemoryRetrieveTool options: show_source: true members_order: source

MemorySearchTool

::: openjarvis.tools.storage_tools.MemorySearchTool options: show_source: true members_order: source

MemoryIndexTool

::: openjarvis.tools.storage_tools.MemoryIndexTool options: show_source: true members_order: source


MCP Adapter

Integration with the Model Context Protocol (MCP). The MCP adapter exposes OpenJarvis tools as MCP-compatible resources and allows consuming external MCP tool providers. Supports MCP protocol version 2025-11-25.

MCPToolAdapter

::: openjarvis.tools.mcp_adapter.MCPToolAdapter options: show_source: true members_order: source

MCPToolProvider

::: openjarvis.tools.mcp_adapter.MCPToolProvider options: show_source: true members_order: source