Skip to main content

Function: defineTool()

Function: defineTool()

function defineTool<S>(config: ToolEntry<S>): ToolEntry<S>;

Defines a single tool entry for a plugin's internal registry.

The generic S flows from schema through to the handler callback so args is fully typed from the Zod schema. Names are assigned by the registry key, so they are not repeated inside the entry.

Type Parameters

Type Parameter
S extends ZodType<unknown, unknown, $ZodTypeInternals<unknown, unknown>>

Parameters

ParameterType
configToolEntry<S>

Returns

ToolEntry<S>

Databricks Developer Hub

Ready to ship your next agentic app in minutes?

Read docs