Skip to content

Tool Governance

All tools are defined in src/tools/registry.ts in the AI Service. This is the single source of truth for tool availability and permissions.

ToolCategoryPermissionDescription
semantic_searchread_onlybasicNatural language log search via k-NN
opensearch_queryread_onlystandardOpenSearch queries and aggregations
get_scan_resultsread_onlystandardCompliance scan result retrieval
analyze_logsread_onlystandardAI-powered log analysis via Analyzer

Tools that only read data. No side effects. These can be granted to any agent type.

Tools that create or modify data:

  • create_scan — Trigger a new compliance scan
  • update_agent_config — Modify agent settings
  • dismiss_anomaly — Mark an anomaly as acknowledged

external — Requires explicit approval (Phase 3)

Section titled “external — Requires explicit approval (Phase 3)”

Tools that call external services:

  • send_discord_alert — Post to Discord
  • send_email — Email notification
  • call_webhook — Custom webhook

admin — Platform-only, never agent-accessible

Section titled “admin — Platform-only, never agent-accessible”

Tools reserved for system operations, never exposed to user-created agents.

LevelDescriptionWho Can Use
basicMinimal risk, broad accessAll agent types
standardNormal operationsUser-created + system agents
elevatedSensitive operationsAdmins only
adminPlatform administrationSystem processes only

The AgentLoop accepts a toolsAllowed array to restrict which tools an agent can call:

// Full access (interactive chat)
const loop = new AgentLoop(allTools);
// Agent-restricted access
const loop = new AgentLoop(allTools, {
toolsAllowed: ["semantic_search", "opensearch_query"]
});
// Agent can ONLY call these two tools, even if it tries to call others

The filter happens before tool definitions are sent to the LLM, so the model never sees tools it cannot use.

The Tool Browser modal allows users to explore tools when building agents:

┌──────────────────────────────────────────────────┐
│ Tool Browser │
├────────────────┬─────────────────────────────────┤
│ read_only │ semantic_search │
│ semantic_search │ Permission: basic │
│ opensearch_query│ │
│ get_scan_results│ Search logs using natural │
│ analyze_logs │ language. Uses k-NN vector │
│ │ similarity to find semantically │
│ write (Phase 3)│ similar log entries. │
│ [locked] │ │
│ │ Input schema: │
│ external │ • query: string (required) │
│ [locked] │ • index: string (optional) │
│ │ • k: number (default: 10) │
└────────────────┴─────────────────────────────────┘

To add a new tool to the registry:

  1. Create src/tools/myNewTool.tool.ts in the AI Service
  2. Register in src/tools/registry.ts:
my_new_tool: {
category: 'read_only',
permissionLevel: 'standard',
description: 'What this tool does',
inputSchema: { ... },
handler: myNewToolHandler
}
  1. Update tool documentation in this playbook
  2. The tool is immediately available for agents that include it in toolsAllowed

Planned: Track which tools are used most by agents, flag tools with high error rates, and surface usage stats in the Tool Browser.