tools
Tool execution layer providing the Executor interface, built-in tool implementations, composite pipelines, MCP bridge, and the tool manager that routes calls with schema validation and repair.
Used by cmd/worker, cmd/ui, cmd/seed-registry.
Usage
import "cruvero/internal/tools"
Key Types / Interfaces
| Type | Source | Description |
|---|---|---|
Executor | types.go | Interface: Name, Description, Schema, Execute |
ReadOnlyExecutor | types.go | Mixin marking tools as side-effect-free |
ToolDefinition | types.go | Tool metadata: schema, cost hint, read-only flag |
Manager | manager.go | Routes tool calls, validates schemas, manages repair |
MCPBridge | mcp_bridge.go | Adapts MCP servers into Executor interface |
CompositeToolDef | composite.go | Composite pipeline definition with steps |
CompositeStep | composite.go | Single step in a composite pipeline |
Built-in Tools
| Tool | File | Description |
|---|---|---|
http_get | http_get.go | HTTP GET with response parsing |
calculator | calculator.go | Arithmetic expression evaluation |
key_value_store | kv.go | Dragonfly-backed key-value operations |
memory_write / memory_read | memory_tool.go | Read/write agent memory |
python_exec | python_exec.go | Sandboxed Python execution |
bash_exec | bash_exec.go | Sandboxed bash execution |
model_list / model_prefs | model_tool.go | Model catalog queries |
cost_summary | cost_tool.go | Cost breakdown queries |
sim_* | sim_*.go | Simulation tools (ArgoCD, tickets, Git PRs, etc.) |
Key Files
| File | Purpose |
|---|---|
types.go | Executor interface and ToolDefinition |
manager.go | Tool routing, schema validation, repair loop |
composite.go | Composite pipeline execution engine |
mcp_bridge.go | MCP protocol adapter |
contract.go | Pre/postcondition contract enforcement |
repair.go | Automated tool error repair |