Skip to content

toolSearchTool

function toolSearchTool<Context>(options?): HostedTool;

Adds tool_search capabilities to your agent.

This lets the model search deferred function tools and load them into context on demand. By default, tool search is executed by OpenAI. Set execution: 'client' to use a custom loop that receives tool_search_call / tool_search_output items. The standard runner only supports the default built-in client schema (leave parameters unset) and auto-executes { paths: string[] } searches over deferred top-level function tools and deferred namespace members.

Type Parameter Default type

Context

unknown

Parameter Type

options?

Partial<Omit<ToolSearchTool<Context>, "type">>

HostedTool

a hosted tool_search definition.