Python 88.3%
TypeScript 7.6%
Shell 4.1%
1# Tool search (`type: "tool_search"`) and deferred tools (`defer_loading`)23**Status:** DOCUMENTED · LIVE_VERIFIED (2026-09-18, hosted mode on `gpt-5.4-mini`; `gpt-5.4-nano` does not list `tool_search` on its model page and was not used)4**Sources:** https://developers.openai.com/api/docs/guides/tools-tool-search · https://developers.openai.com/api/docs/guides/function-calling#namespaces · openapi-master.yaml `ToolSearchToolParam`, `ToolSearchCall`, `ToolSearchOutput`, `NamespaceToolParam`, `AdditionalTools`5**Last verified:** 2026-09-1867## Definition89| Field | Type / enum | Notes |10|---|---|---|11| `type` | `tool_search` | |12| `execution` | `server` (hosted, default) \| `client` | client: your app performs the lookup and returns `tool_search_output` |13| `description` | string \| null | shown to the model in client mode |14| `parameters` | object \| null | client-mode search arguments schema |1516Deferred tools: `defer_loading: true` on `function`, `custom` (inside or outside a `namespace`) and `mcp` tools. The model initially sees only names/descriptions of namespaces/servers; loaded definitions are appended at the **end of context** to preserve the prompt cache. `additional_tools` input item adds tools mid-conversation. `tool_choice` applies to the currently loaded tools. Responses API: **gpt-5.4 and later** only; Agents API loads eagerly unless `{type: tool_search}` is added.1718## Items (live shapes)1920```json21{"id":"tsc_…","type":"tool_search_call","status":"completed","call_id":null,"execution":"server","arguments":{"paths":["weather"]}}22{"id":"tso_…","type":"tool_search_output","status":"completed","call_id":null,"execution":"server","tools":[{"type":"namespace","name":"weather",…}]}23{"id":"fc_…","type":"function_call","namespace":"weather","name":"get_weather","arguments":"{\"city\":\"Paris\"}","call_id":"call_…"}24```25Client mode: the first turn stops at `tool_search_call`; you return `{"type":"tool_search_output","call_id":…,"execution":"client","tools":[<tool definitions>]}` (may include tools not declared in `tools`).2627## Live evidence2829`gpt-5.4-mini`, `tools: [{type: tool_search}, {type: namespace, name: weather, description, tools: [get_weather with defer_loading: true]}]`, prompt "Weather in Paris? Find and use a tool." → `reasoning`, `tool_search_call`, `tool_search_output` (loaded the whole `weather` namespace), `function_call` with `namespace: "weather"`; usage ≈ $0.0007.3031Examples: `examples/openai/tools/tool-search/` (sh/py/ts). Test (expensive): `test_tool_search_hosted`.32