Skip to main content

Function: executeFromRegistry()

Function: executeFromRegistry()

function executeFromRegistry(
   registry: ToolRegistry, 
   name: string, 
   args: unknown, 
signal?: AbortSignal): Promise<unknown>;

Validates tool-call arguments against the entry's schema and invokes its handler. On validation failure, returns an LLM-friendly error string (matching the behavior of tool()) rather than throwing, so the model can self-correct on its next turn.

Parameters

ParameterType
registryToolRegistry
namestring
argsunknown
signal?AbortSignal

Returns

Promise<unknown>

Databricks Developer Hub

Ready to ship your next agentic app in minutes?

Read docs