Class: ActionAgent::Api::ToolsController

Inherits:
BaseController show all
Defined in:
app/controllers/action_agent/api/tools_controller.rb

Overview

Read API for the tool inventory, backing the dashboard Tools view.

Nothing here is registered by hand: ToolDiscovery derives the inventory from the tool roster each generation request offered, from telemetry tool spans, and from solid_agent generation/message records, then unions it with the tools each agent has enabled in the builder so configured-but-unused tools are visible too.

Constant Summary collapse

ORIGIN_FILTERS =

Filter labels for the view's origin tabs, so the set of buckets is defined server-side alongside the classification that produces them.

{
  "all" => "All tools",
  ToolDiscovery::ORIGIN_MCP => "MCP",
  ToolDiscovery::ORIGIN_BUILTIN => "Dashboard",
  ToolDiscovery::ORIGIN_AGENT => "Agent-defined"
}.freeze

Instance Method Summary collapse

Methods inherited from ActionAgent::ApplicationController

allow_unauthenticated_access

Instance Method Details

#indexObject

GET /api/tools



25
26
27
28
29
30
31
32
# File 'app/controllers/action_agent/api/tools_controller.rb', line 25

def index
  inventory = discovery.inventory

  render json: inventory.merge(
    tools: filtered(inventory[:tools]),
    origins: ORIGIN_FILTERS
  )
end