services/registry/registry
Tool registry — pure dispatch functions. Moved from core/registry/ to services/registry/ (Stage 2B). No imports from plugins/. All wiring lives in builder.gleam.
Values
pub fn dispatch_from(
tools: List(tool.Tool),
name: String,
args_json: String,
cache: List(#(String, String, guardrails.ApprovalScope)),
session_id: String,
) -> #(
tool.ToolResult,
List(#(String, String, guardrails.ApprovalScope)),
)
Dispatch a tool call from a custom tool list.
pub fn find_in(
tools: List(tool.Tool),
name: String,
) -> Result(tool.Tool, String)
Look up a tool by name from a custom tool list.
pub fn schemas_from(tools: List(tool.Tool)) -> List(json.Json)
Return just the JSON schemas from a custom tool list.
pub fn to_definitions_from(
tools: List(tool.Tool),
) -> List(tool_def.ToolDefinition)
Convert a custom tool list to tool_def.ToolDefinition for the completions API.