{
  "id": 12596652,
  "title": "AI Tool Calling: The Model Never Runs Your Code",
  "url": "https://urgent.news/2026/10/07/ai-tool-calling-the-model-never-runs-your-code",
  "topic": "ai",
  "section": "AI",
  "published": "2026-10-07T09:43:36.000Z",
  "source": {
    "name": "Dev.to",
    "slug": "dev-to",
    "url": "https://dev.to/dilip_v_p/ai-tool-calling-the-model-never-runs-your-code-45ok"
  },
  "original_language": "en",
  "account": "The headline \"AI Tool Calling: The Model Never Runs Your Code\" explains how artificial intelligence can understand and execute actions on behalf of users without actually running code itself. Here's a summary of the key points:\n\n1. A customer interacts with a food app's support chat by typing a request to cancel their order 4472 if no rider is assigned yet. The app uses AI to process the request.\n\n2. No custom code was written for this specific request. Instead, an AI model reads the customer's sentence and determines which functions to call within the app's own code.\n\n3. This process is called \"tool calling\" or \"function calling.\" It allows the AI model to understand the task it needs to perform and then delegate the execution to the app's code.\n\n4. Tools are described in the app's code as functions with a name, a description of what they do, and the inputs they require. For example, the app provides a function called \"get_order\" that fetches an order by its ID.\n\n5. When the AI model receives a customer's request, it sends a \"tool call\" to the app, specifying the tool to use and the necessary arguments. In this case, it sends a \"get_order\" tool call with the order ID 4472.\n\n6. The app's code receives the tool call, checks if the requested tool is available, and then executes the corresponding function using the provided arguments. In this example, it calls the \"get_order\" function to fetch the order details.\n\n7. The app then processes the fetched order information and, in this case, determines that the order has no assigned rider. Since the customer requested cancellation, the app updates the order status to \"CANCELLED.\"\n\n8. The model sends a follow-up tool call to cancel the order using the \"cancel_order\" function with the same order ID.\n\n9. The app executes the cancellation, updates the order status in the database, and sends a message to a queue to notify the restaurant about the cancellation.\n\n10. Finally, the model replies to the customer with plain text, confirming that the order has been cancelled.\n\nThe article highlights how AI models can leverage existing code without writing new code for every possible user request. By defining tools and providing necessary inputs, the model can understand the task and delegate the execution to the app's code, resulting in a more efficient and flexible system.",
  "summary": "A customer types one sentence into a food app's support chat: Where is order 4472? Cancel it if no rider is assigned yet. The app checks the order, cancels it, and replies. Here is the strange part. No code was ever written for that sentence. An AI model read it, looked at the functions the app offered it, and decided which ones to call. That is called tool calling . Some vendors call it function…",
  "key_points": [
    "Customer requests order cancellation via food app chat",
    "AI model processes request without writing custom code",
    "AI uses \"tool calling\" to delegate execution to app code"
  ],
  "editors_take": null,
  "illustration": null,
  "coverage": {
    "outlets": 1,
    "also_reported_by": []
  },
  "ai_generated": true,
  "disclaimer": "Summaries, key points and the editor’s take are written by software from other outlets’ reporting and may contain errors — always check the linked original."
}