The fastest, cheapest, most efficient open-source agent harness. Run more than 500 agents on a $10 VPS.
Rust agent-orchestrationai-agentsai-assistantdesktopllmlocal-firstmcppersonal-aiprivacyrustsecond-braintauri
docs: document the tools module and its implementation
Steven Enamakel0e4c218732fd
diff --git a/crates/openhuman-core/src/tools/README.md b/crates/openhuman-core/src/tools/README.mdindex 0bc9822a0a..90d77361bc 100644--- a/crates/openhuman-core/src/tools/README.md+++ b/crates/openhuman-core/src/tools/README.md@@ -40,7 +40,7 @@ The agent tool layer. Defines the core [`Tool`] trait every agent-callable capab| `crates/openhuman-core/src/tools/impl/browser/` | `browser` (DOM-snapshot automation, pluggable backend), `browser_open`, `image_info`, Playwright backend. || `crates/openhuman-core/src/tools/impl/system/` | Tools `shell`, `node_exec`, `npm_exec`, `python_exec`, `install_tool`, `detect_tools`, `current_time`, `resolve_time`, `schedule`, `proxy_config`, `pushover`, `lsp`, `tool_stats`, `update_check`, `update_apply`, `insert_sql_record`, `read_workspace_state`, `retrieve_tool_output`. Helper module (not a tool): `command_output`, the shared exit-code/stdout/stderr formatter for the shell family. || `crates/openhuman-core/src/tools/impl/network/` | Tools `http_request`, `web_fetch`, `curl`, `gitbooks_search`/`gitbooks_get_page`, `mcp_list_servers`/`mcp_list_tools`/`mcp_call_tool` (`mcp`-feature gated), `gmail_unsubscribe`. Helper module: `url_guard` (host allowlist matching, private-address rejection, `validate_url`). |-| `crates/openhuman-core/src/tools/impl/meta/` | Tools *about* the tool surface itself: `tool_search` (the lookup half of `ToolExposure::Deferred`) and `collapse` (multi-action schema/permission merging helpers). |+| `crates/openhuman-core/src/tools/impl/meta/` | Tools *about* the tool surface itself: `deferred` (the host's half of `ToolExposure::Deferred`; the harness's intrinsic `tool_search` bridge is the lookup half) and `collapse` (multi-action schema/permission merging helpers). || `crates/openhuman-core/src/tools/impl/document/` (`documents` feature) | `DocumentTool` (`generate_document`) — structured document generation/editing engine. || `crates/openhuman-core/src/tools/impl/presentation/` (`documents` feature) | `PresentationTool` (`generate_presentation`) — structured slide-deck generation engine. || `crates/openhuman-core/src/search/` | Search engine registry and search-owned agent tools such as `web_search`. |@@ -79,7 +79,7 @@ This module **owns** the cross-cutting built-in tools (the only ones that belong- **System/process**: `shell`, `node_exec`, `npm_exec`, `python_exec`, `install_tool`, `detect_tools`, `current_time`, `resolve_time`, `schedule`, `proxy_config`, `pushover`, `lsp`, `tool_stats`, `update_check`, `update_apply`, `insert_sql_record`, `read_workspace_state`, `retrieve_tool_output`.- **Browser**: `browser`, `browser_open`, `image_info`.- **Generic network**: `http_request`, `web_fetch`, `curl`, `gitbooks_search`/`gitbooks_get_page`, MCP bridge (`mcp_list_servers`/`mcp_list_tools`/`mcp_call_tool`), `gmail_unsubscribe`.-- **Meta**: `tool_search` (deferred-tool lookup) and the `collapse` multi-action helpers used by other tools' schema merging.+- **Meta**: `deferred` (which tools leave the wire for the harness's `tool_search` bridge) and the `collapse` multi-action helpers used by other tools' schema merging.- **Documents** (`documents` feature): `generate_document` (`DocumentTool`), `generate_presentation` (`PresentationTool`).- **Search**: `web_search` and provider-specific search families are registered by `crate::search`; `search.engine = "disabled"` suppresses this surface entirely.diff --git a/crates/openhuman-core/src/tools/impl/README.md b/crates/openhuman-core/src/tools/impl/README.mdindex c03bc93015..ef1c97552f 100644--- a/crates/openhuman-core/src/tools/impl/README.md+++ b/crates/openhuman-core/src/tools/impl/README.md@@ -35,7 +35,7 @@ tested but no production assembly site constructs it today.| `network/` | `HttpRequestTool`, `WebFetchTool`, `CurlTool`, `GitbooksSearchTool`, `GitbooksGetPageTool`, `GmailUnsubscribeTool`, and under the `mcp` Cargo feature `McpListServersTool`, `McpListToolsTool`, `McpCallTool`; `url_guard.rs` is the shared SSRF/allowlist validator, not a tool | `http_request`, `web_fetch`, `curl`, `gmail_unsubscribe` always registered; `gitbooks_*` need `gitbooks.enabled` and, when the active profile sets an `mcp_allowlist`, an entry named `gitbooks`; `mcp_list_servers`/`mcp_list_tools`/`mcp_call_tool` register only when the static `[[mcp_client.servers]]` registry (after the profile allowlist) is non-empty || `document/` (feature `documents`) | `DocumentTool` (`generate_document`) | always registered when compiled. Builds `.docx` bytes via the pure-Rust `engine` module (`docx-rs`, no subprocess) inside `spawn_blocking` + `tokio::time::timeout`; allocates the artifact with `agent::artifacts::create_artifact` (kind `Document`), persists `args.json` next to it for the failed-card Retry path, then `finalize_artifact` or `fail_artifact` || `presentation/` (feature `documents`) | `PresentationTool` (`generate_presentation`) | always registered when compiled. Same shape as `document/` with `ppt-rs` producing `.pptx` and kind `Presentation` |-| `meta/` | `ToolSearchTool` (`tool_search`, name constant `TOOL_SEARCH_NAME`), `ToolSearchIndex`, `ToolSearchHandle`, `strip_deferred_from_visible`, `bind_tool_search_index`; `collapse` helpers (`resolve`, `merge_action_schemas`, `args_without_action`, `strictest_permission`, `any_external_effect`, `unknown_action_message`, `CollapsedAction`) | not registered: nothing in `tools/ops.rs` or the session builder constructs `ToolSearchTool`, and `strip_deferred_from_visible`/`bind_tool_search_index` have no production caller, so `ToolExposure::Deferred` (declared by e.g. `integrations/tools/stock_prices.rs`) is not enforced today; only `Hidden` is filtered in `agent/session_host/builder/factory.rs`. The `collapse` helpers are used by `cron/tools/collapsed.rs` and `memory/tools/collapsed.rs` to merge a multi-action tool's per-action schemas and permissions into one entry |+| `meta/` | `deferred` (`strip_deferred_from_visible`, `deferred_tool_names`, the `TOOL_SEARCH_NAME` belt opt-in constant); `collapse` helpers (`resolve`, `merge_action_schemas`, `args_without_action`, `strictest_permission`, `any_external_effect`, `unknown_action_message`, `CollapsedAction`) | not registered: `deferred` is the host's half of `ToolExposure::Deferred` — the session builder (`agent/session_host/builder/builder_build.rs`) uses it to split a belt into the advertised set and the still-registered deferred set, and the tinyagents harness advertises its intrinsic `tool_search` / `tool_call` bridge over the latter (ranked per `agent/tinyagents/discovery`). The `collapse` helpers are used by `cron/tools/collapsed.rs` and `memory/tools/collapsed.rs` to merge a multi-action tool's per-action schemas and permissions into one entry |## Notes