When an LLM API's "function calling" (tool use) feature returns a function call in its response, what actually happens next in a typical integration?
- The API executes the function directly on the vendor's infrastructure and returns only the final answer text, with no involvement from the calling application
- The response contains a structured description of the function name and the arguments the model wants to pass; the calling application must run the actual function itself and send the result back in a follow-up request
- The model runs the function inside its own weights using an internal code interpreter, producing the function's return value without any external execution step
- The request fails with an error unless the function has already been executed and its output included as part of the original prompt
Why B? And why not the others?
Correct answer: B. The response contains a structured description of the function name and the arguments the model wants to pass; the calling application must run the actual function itself and send the result back in a follow-up request
This is correct because standard function/tool calling returns a structured block naming the tool and the arguments the model wants to pass; the model itself has no way to execute arbitrary code or reach external systems, so the calling application is responsible for actually running the corresponding function and returning its result in a subsequent request so the model can incorporate it. The option describing vendor-side execution confuses this with built-in "server tools" (such as a hosted web-search tool) that some vendors run on their own infrastructure -- that is the exception, not the general mechanic of user-defined function calling. The option about the model running the function internally is wrong because a language model's weights encode learned associations, not a general-purpose interpreter capable of arbitrary code execution. The option requiring the function's output before the first request is backwards: the whole point of the feature is that the model requests the call first, before any result exists.
Source: Anthropic, 'Tool use with Claude' overview, https://platform.claude.com/docs/en/agents-and-tools/tool-use/overview; OpenAI, 'Function calling' guide, https://platform.openai.com/docs/guides/function-calling