Built-In Tools vs. Custom Tools in LLM Agents A technical comparison of built-in versus custom tools in LLM agents finds that provider-run tools such as OpenAI's and Anthropic's hosted web search execute the entire tool loop inside a single API request, while custom tools require the developer to run the code on their own infrastructure. OpenAI's function-calling documentation describes a five-step flow for custom tools — send tools, get tool call, execute on the application side, send tool output back, get the final answer — whereas Anthropic's web-search flow lets Claude decide when to search and return results multiple times within one request. The distinction matters because providers including DeepSeek support tool calls but offer no hosted web-search tool, forcing developers to bring and run their own search tool. My First Week With GPT-6 Astra GPT-6 Astra was my main Codex driver for the last week, and I am back on GPT-5.5. That sounds harsher than my… When building AI agents, a tool can be anything that the model can ask to use such as a search engine, a database lookup, a shell command, etc. The model doesn’t directly operate those tools, but rather decides what tool would be helpful, requests a tool use with parameters, gets the result back, and then continues it's work. A custom tool is a tool that you define and run on your own infrastructure. You provide a schema such as search web or get customer balance to the model, the model requests it, and your application runs the actual code on your infrastructure. A built-in tool is different. The provider runs it in its own runtime. In practice this mostly means hosted web search. OpenAI https://developers.openai.com/api/docs/guides/tools-web-search and Anthropic https://platform.claude.com/docs/en/agents-and-tools/tool-use/web-search-tool both offer provider-run web search in their APIs. That means if you use ChatGPT or Claude or Codex CLI or Claude Code , they can just search the web and access websites, which internally means they use their built-in web search tool. Other providers like DeepSeek https://api-docs.deepseek.com/guides/tool calls also support tool calls any llm does so more or less but don’t offer a hosted web-search tool themselves, so you’ll have to bring and run the search tool yourself. So a built-in tool feels more “native” mostly because it happens "magically" under the hood. The question I'm interested in here is, what's the difference between using built-in tools vs your own custom tools that you give the LLM. In other words, what's the difference between using ChatGPT/Codex with its integrated web search vs. using DeepSeek while providing my own custom made web search tool. The architecture for a normal tool you provide is roughly like this: The key boundary here is that the model doesn’t execute your function. It returns a structured request that says, effectively: { "tool": "search web", "arguments": { "query": "latest Nvidia earnings" } } Your program sees that, executes something, and sends the result back. The current function-calling documentation https://developers.openai.com/api/docs/guides/function-calling from OpenAI describes this five-step flow pretty much exactly: send tools, get tool call, execute on your application side, send tool output back, get continuation/final answer. Now move the orchestrator inside the provider. The entire loop can happen in one API request from your end. Anthropic’s current web-search flow https://platform.claude.com/docs/en/agents-and-tools/tool-use/web-search-tool works like this: Claude decides when to search, the API searches and returns results to Claude, and this can happen multiple times in the request before Claude returns the final answer. OpenAI also refers to the use of a reasoning model for web search as agentic search , where the model manages the search process, analyzes the results, and can choose to continue searching. The search events are exposed in their Responses API as web search call items https://developers.openai.com/api/docs/guides/tools-web-search . So that distinction you're noticing is real. This is where terminology gets tricky. Conceptually, yes: OpenAI documentation currently describes agentic web search as being able to do searches “as part of its chain of thought.” But do not interpret that as an HTTP request that somehow occurs between transformer layer 63 and transformer layer 64. That’s almost certainly not the right mental model. A better abstraction would be the generated text hitting a tool boundary, where the external runtime does the tool work and the model continues from the returned observation. The generation is effectively interrupted/suspended at a tool boundary, where an external system gets an observation and generation proceeds with that observation available. The exact internal implementation KV cache handling, worker scheduling, separate inference passes, etc. is a provider-private implementation detail. Do not assume that the tool is literally implemented within one transformer forward pass. At the abstract level: LLM → action → environment → observation → LLM So, no new cognitive operation is magically available only with provider tools. This distinction is important. This is where the practical difference becomes significant. There are several advantages a provider can have. This is potentially the biggest difference. Imagine these two tool schemas. Your tool: internet lookup query, search depth, domains, freshness Provider tool: web search ... The provider may have trained the model on millions of trajectories like the following during post-training: question → reason → web search → inspect → reason → web search → inspect → answer with citation They can optimize things like: Should I search? What query should I issue? Should I search again? Which result should I open? Which information is relevant? Should I trust it? When do I have enough evidence? How do I cite it? That is much more than learning JSON syntax. It is tool-use policy learning . For example, Anthropic discusses interleaved thinking https://platform.claude.com/docs/en/build-with-claude/extended-thinking for supported tool-use modes. In this case, the model can reason between tool calls to decide what to do next. So, if you plug in your own unfamiliar search tool, the model might generalize very well, but it might not have exactly the same amount of post-training on your particular interface . This is another important point. Suppose your implementation is: results = bing.search query return results :10 The model receives 10 chunks. A provider's web search might conceptually be closer to: query generation ↓ multiple search backends ↓ ranking ↓ fetch pages ↓ extract readable content ↓ deduplicate ↓ spam/quality filtering ↓ reranking ↓ token-budget optimization ↓ citation metadata ↓ model context And there can be additional loops around it. Anthropic’s current web search is a good concrete example. Newer versions can get Claude to run code to filter search results before they get into the model context , so irrelevant content takes up fewer context tokens. OpenAI also allows controls over search context and returned-token budgets, and its search in reasoning mode can perform search, page opening, and find-in-page tasks. So when comparing: provider web search versus mySearchTool you may actually be comparing two very different retrieval systems. Your loop may involve model inference, an API round trip to your application, your own process, a search API call, another process step, another API round trip, and then model inference again. Perhaps repeated 5 times. A hosted loop may look more like a model worker that calls an internal tool service and then continues on the model worker. The provider has opportunities to optimize for scheduling, networking, result serialization, caching, streaming, etc. That can make multi-step research materially faster. I would not, though, assume things like “they definitely preserve the exact KV cache across searches” unless the provider explicitly documents it. That is implementation-specific. With a client tool, suppose you return this: { "results": { "title": "...", "content": "8,000 tokens..." }, { "title": "...", "content": "10,000 tokens..." }, ... } You've now dumped a mountain of text into the model context. A tool integrated with a provider can tightly control search corpus, filtering, extraction, reranking, selection, compression and model context. And metadata can potentially be kept separately. That often gives you a better: useful-information / context-token ratio. This can have a surprisingly large effect on agent quality. Provider-hosted doesn't inherently mean superior. Imagine you're building a programming agent. Instead of generic web search, you give it: search github code search stackoverflow search npm fetch package docs search internal docs lookup symbol plus carefully optimized schemas and result formatting. That system may dramatically outperform generic web search for your application. Or for a financial agent: get sec filing get realtime price get earnings transcript query bloomberg is probably preferable to blindly searching the internet. So provider tools tend to win on: general-purpose integration zero setup latency citations model/tool co-optimization while your own tools win on: control domain specificity private data deterministic APIs custom ranking observability security boundaries cost control provider independence Modern agent architectures actually have something like four levels. Level 1: A client function. Level 2: A remote tool or MCP server. Level 3: A tool hosted by a provider. Level 4: A full product-level agent environment with shell, filesystem, browser, search, git, task state, etc. At this point you're not really comparing models anymore. You're comparing agent systems . And that's becoming increasingly important. Suppose you have: Model A - excellent reasoning - excellent function calling - no web-search feature and: Model B - excellent reasoning - native web search You can absolutely build this around Model A: while True: response = model messages, tools=tools if response.tool call: result = run tool response.tool call messages += response.tool call, result continue return response.text Architecturally, you've recreated the same agent loop. There's no fundamental reason Model A couldn't do excellent web research. The main variables become: reasoning ability × tool-use training × quality of your search stack × context management × agent-loop design not simply: native web search: yes/no There is a more fundamental distinction here. Consider three models: Model A Excellent reasoning Excellent native/function tool use Model B Excellent reasoning Tool calling supported but mediocre Model C Plain text model, no meaningful tool-use training You can bolt tools onto all three. For C you could say: When you want to search, output: