Ir para o conteúdo principal

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

Pronto para lançar seu próximo aplicativo baseado em agentes em minutos?

Ler a documentação