Tool System & Discoverability

JAATO provides tools to AI models through a deferred loading architecture. Rather than loading all 100+ tools upfront, JAATO exposes only a small set of core tools initially. The model discovers additional tools on-demand through introspection, reducing initial context overhead by 70–85%.

Tool System Infography
Click to open full-size image in a new tab

Discoverability Modes

Every tool in JAATO has a discoverability attribute that controls when it appears in the model's context:

ModeBehaviorWhen to Use
coreAlways loaded in initial contextEssential tools the model needs immediately
discoverableLoaded on-demand via introspectionSpecialized tools for specific use cases

All tools default to "discoverable" unless explicitly marked as "core". This means the traditional approach of loading all tool schemas upfront (8,000–15,000 tokens) is replaced by an initial load of ~1,500–2,500 tokens for core tools only.

Core Tool Registry

Core tools represent the minimum viable toolkit for agentic operation, consuming approximately 1,200 tokens:

PluginToolWhy Core?
introspectionlist_tools, get_tool_schemasGateway to all other tools — discovery mechanism
file_editreadFileEssential for code understanding (most frequent operation)
clirunFundamental system interaction (builds, tests, etc.)
environmentget_environmentContext awareness (OS, working directory)
todo8+ toolsTask management for complex multi-step operations

Introspection Mechanism

The introspection system bridges core and discoverable tools through a two-step workflow:

  1. list_tools(category="search") — Returns available tools in a category with names and descriptions
  2. get_tool_schemas(names=["web_search"]) — Retrieves detailed parameter schemas and activates the tool for use

The activation step is critical: calling get_tool_schemas() automatically adds the requested tools to the provider's declared tool list, making them callable. Before this call, the model cannot invoke discoverable tools.

Available Categories

CategoryDiscoverable Tools
filesystemupdateFile, writeNewFile, removeFile, moveFile, copyFile, glob_files, list_directory, etc.
searchgrep_content, web_search, ast_search
webfetch_url, fetch_url_post
coordinationdelegate (subagents), start_background, save_waypoint, etc.
communicationrequest_clarification
memorylist_templates, get_template, create_template, etc.
MCPDynamic tools from connected MCP servers

Tool Execution Pipeline

Once a tool is available (core or activated), execution follows a six-step pipeline:

  1. Permission check — Gated by the permission plugin (auto-approved, whitelisted, or user prompt)
  2. Auto-background check — Long-running tools may be automatically backgrounded
  3. Executor lookup — Maps tool name to its callable via the plugin registry
  4. Execute — Runs the tool logic, handles streaming if supported
  5. Result enrichment — Plugins can modify or augment results post-execution
  6. Return to model — Success/failure result fed back to the model

Parallel Tool Execution

When the model requests multiple independent tools in a single turn, JAATO executes them concurrently using a thread pool (max 8 workers). This is enabled by default via JAATO_PARALLEL_TOOLS=true.

Each tool call receives a unique call_id for correlation. Permission prompts are serialized through a channel lock to ensure the user sees one prompt at a time, even when multiple tools need approval concurrently.

Tool Inventory Summary

CategoryCore ToolsDiscoverable ToolsTotal
Introspection202
Filesystem19+10+
System12+3+
Coordination8+5+13+
Search03+3+
Web02+2+
MCP0dynamicdynamic
Total~14~85+~100+

Plugin Lifecycle

Tools are provided by plugins managed through the PluginRegistry. Each plugin goes through four phases:

  1. Discovery — Registry scans entry points and shared/plugins/ directory
  2. Exposure — Plugin is initialized, auto-wired (registry, session, workspace), schemas and executors registered
  3. Operation — Plugin provides schemas, executors, system instructions, and handles tool calls
  4. Shutdown — Plugin cleanup on unexpose or session end
Back to Enterprise Overview