{"id":"6b08c25038c84264c20274dc","slug":"tool-use","title":"Tool use: how a language model calls your application's functions","summary":"The model does not run code – it proposes tool calls that follow a schema, and your application executes them and sends the results back. The tool use loop step by step, good tool definitions, errors, parallel calls, the tool runner and security.","servedLang":"en","availableLangs":["pl","en"],"topics":["tool-use","ai-agents","mcp","ai-guardrails"],"techs":["python","typescript","dotnet"],"tags":["tool-use","function-calling","json-schema","structured-outputs","tool-runner","claude"],"level":"intermediate","kind":"article","access":"members","status":"published","cover":null,"author":{"id":"6b08bd2e80884893657cc8cf","name":"Redakcja Art of Devs","avatar":null,"handle":"redakcja","community":false},"readingMinutes":17,"stats":{"views":4,"likes":0,"bookmarks":0,"comments":0},"publishedAt":"2026-11-26T23:35:44.634Z","updatedAt":"2026-11-27T13:06:04.411Z","requestedLang":"en","theme":{"hero":"classic","heroMedia":null,"accent":"rose","background":"hex","weaveResources":true,"toc":"right"},"seoDescription":"Tool use (function calling) for developers: tool definitions in JSON Schema, the tool_use and tool_result loop, strict, tool_choice, parallel calls, error handling, the tool runner and authorization. Code in Python, TypeScript and C#.","wordCount":3328,"doc":{"type":"doc","content":[{"type":"paragraph","content":[{"type":"text","text":"On its own, a language model knows only what was in its training data and in the context. It will not check an order's status, look into the allergen database or send a text message. "},{"type":"text","text":"Tool use","marks":[{"type":"bold"}]},{"type":"text","text":" ("},{"type":"text","text":"function calling","marks":[{"type":"italic"}]},{"type":"text","text":") is the mechanism in which the model receives a description of available functions and, instead of a text answer, can return a structured request: \"call "},{"type":"text","text":"get_order_status","marks":[{"type":"code"}]},{"type":"text","text":" with "},{"type":"text","text":"order_id = 1042","marks":[{"type":"code"}]},{"type":"text","text":"\". "},{"type":"text","text":"Your application","marks":[{"type":"bold"}]},{"type":"text","text":" runs the code – the model only decides what to call and with which arguments."}]},{"type":"stats","attrs":{"items":[{"value":"4","label":"steps in one round","hint":"definitions → tool_use → execution → tool_result"},{"value":"1","label":"message with the results","hint":"all tool_results together, even for several calls"},{"value":"0","label":"lines of code run by the model","hint":"execution, permissions and side effects are on your side"}]}},{"type":"callout","attrs":{"variant":"info","title":"TL;DR"},"content":[{"type":"bulletList","content":[{"type":"listItem","content":[{"type":"paragraph","content":[{"type":"text","text":"A tool is a name, a description and a JSON schema for its arguments. The description matters most: it tells the model "},{"type":"text","text":"when","marks":[{"type":"bold"}]},{"type":"text","text":" to use the tool and what it does not return."}]}]},{"type":"listItem","content":[{"type":"paragraph","content":[{"type":"text","text":"The loop: the model returns "},{"type":"text","text":"tool_use","marks":[{"type":"code"}]},{"type":"text","text":" blocks ("},{"type":"text","text":"stop_reason: \"tool_use\"","marks":[{"type":"code"}]},{"type":"text","text":"), the application executes them and sends "},{"type":"text","text":"tool_result","marks":[{"type":"code"}]},{"type":"text","text":" blocks back in one user message – until the model answers with text."}]}]},{"type":"listItem","content":[{"type":"paragraph","content":[{"type":"text","text":"Authorization, limits and confirmation of risky actions belong in code. The model may ask for someone else's order; the application must refuse."}]}]}]}]},{"type":"heading","attrs":{"level":2,"id":"the-problem-an-assistant-that-guesses-the-order-status"},"content":[{"type":"text","text":"The problem: an assistant that guesses the order status"}]},{"type":"paragraph","content":[{"type":"text","text":"A customer writes in the pierogi chat: \"Where is my order #1042, and do the spinach pierogi contain nuts?\". An assistant built on a prompt alone has three bad options: invent a status (\"it will be there in 15 minutes\"), answer about allergens from memory (and the recipe changed last week) or send the customer to the hotline."}]},{"type":"paragraph","content":[{"type":"text","text":"A developer's first instinct is regular expressions: catch "},{"type":"text","text":"#\\d+","marks":[{"type":"code"}]},{"type":"text","text":", query the database, paste the result into the prompt. That works until the first \"and what about the other order, from yesterday?\" or \"are the ruskie lactose-free?\". You cannot sensibly extract intent and arguments from natural language with rules – and that is exactly what the model does for us once it gets tools."}]},{"type":"heading","attrs":{"level":2,"id":"intuition-the-model-as-a-dispatcher-the-application-as-the-kitchen"},"content":[{"type":"text","text":"Intuition: the model as a dispatcher, the application as the kitchen"}]},{"type":"paragraph","content":[{"type":"text","text":"In the pierogi restaurant the waitress does not cook. She talks to the guest, understands what they want and writes an order slip in an agreed format: dish, quantity, notes. The kitchen fulfils the slip and hands back a plate, and the waitress serves it with a comment. If the slip is illegible or the dish is not on the menu, the kitchen sends it back."}]},{"type":"paragraph","content":[{"type":"text","text":"In tool use the model is the waitress: it talks and writes \"slips\" that follow the schema. The application is the kitchen: it validates, checks permissions, executes and hands back a result – or an error. The waitress never walks into the cold room."}]},{"type":"diagram","attrs":{"kind":"mermaid","code":"sequenceDiagram\n  participant C as Customer\n  participant A as Application\n  participant M as Model (API)\n  participant S as Order service\n  C->>A: “Where is order 1042? Do the spinach ones have nuts?”\n  A->>M: message + tool definitions\n  M-->>A: tool_use: get_order_status(1042)<br/>tool_use: check_allergens(spinach pierogi)\n  A->>S: authorization + queries\n  S-->>A: in_delivery, 12 min · gluten, milk, walnuts\n  A->>M: tool_result × 2 (one message)\n  M-->>A: text: “The courier will arrive in about 12 minutes. Note: the sauce contains walnuts.”\n  A->>C: answer","caption":"One conversation with tools: the model proposes calls, the application executes them"}},{"type":"heading","attrs":{"level":2,"id":"the-anatomy-of-a-tool-definition"},"content":[{"type":"text","text":"The anatomy of a tool definition"}]},{"type":"table","content":[{"type":"tableRow","content":[{"type":"tableHeader","attrs":{"colspan":1,"rowspan":1},"content":[{"type":"paragraph","content":[{"type":"text","text":"Field"}]}]},{"type":"tableHeader","attrs":{"colspan":1,"rowspan":1},"content":[{"type":"paragraph","content":[{"type":"text","text":"Contains"}]}]},{"type":"tableHeader","attrs":{"colspan":1,"rowspan":1},"content":[{"type":"paragraph","content":[{"type":"text","text":"Watch out for"}]}]}]},{"type":"tableRow","content":[{"type":"tableCell","attrs":{"colspan":1,"rowspan":1},"content":[{"type":"paragraph","content":[{"type":"text","text":"name","marks":[{"type":"code"}]}]}]},{"type":"tableCell","attrs":{"colspan":1,"rowspan":1},"content":[{"type":"paragraph","content":[{"type":"text","text":"a short, unambiguous name: "},{"type":"text","text":"get_order_status","marks":[{"type":"code"}]},{"type":"text","text":", not "},{"type":"text","text":"order","marks":[{"type":"code"}]}]}]},{"type":"tableCell","attrs":{"colspan":1,"rowspan":1},"content":[{"type":"paragraph","content":[{"type":"text","text":"the name appears in the history; do not rename it without reason"}]}]}]},{"type":"tableRow","content":[{"type":"tableCell","attrs":{"colspan":1,"rowspan":1},"content":[{"type":"paragraph","content":[{"type":"text","text":"description","marks":[{"type":"code"}]}]}]},{"type":"tableCell","attrs":{"colspan":1,"rowspan":1},"content":[{"type":"paragraph","content":[{"type":"text","text":"what the tool does, "},{"type":"text","text":"when","marks":[{"type":"bold"}]},{"type":"text","text":" to use it, what it does not return, limitations"}]}]},{"type":"tableCell","attrs":{"colspan":1,"rowspan":1},"content":[{"type":"paragraph","content":[{"type":"text","text":"the most important field – too short a description is the most common cause of bad choices"}]}]}]},{"type":"tableRow","content":[{"type":"tableCell","attrs":{"colspan":1,"rowspan":1},"content":[{"type":"paragraph","content":[{"type":"text","text":"input_schema","marks":[{"type":"code"}]}]}]},{"type":"tableCell","attrs":{"colspan":1,"rowspan":1},"content":[{"type":"paragraph","content":[{"type":"text","text":"JSON Schema of the arguments with field descriptions, "},{"type":"text","text":"enum","marks":[{"type":"code"}]},{"type":"text","text":", "},{"type":"text","text":"required","marks":[{"type":"code"}]}]}]},{"type":"tableCell","attrs":{"colspan":1,"rowspan":1},"content":[{"type":"paragraph","content":[{"type":"text","text":"field names and descriptions are hints for the model – write them like API docs"}]}]}]},{"type":"tableRow","content":[{"type":"tableCell","attrs":{"colspan":1,"rowspan":1},"content":[{"type":"paragraph","content":[{"type":"text","text":"strict","marks":[{"type":"code"}]}]}]},{"type":"tableCell","attrs":{"colspan":1,"rowspan":1},"content":[{"type":"paragraph","content":[{"type":"text","text":"true","marks":[{"type":"code"}]},{"type":"text","text":" guarantees arguments that match the schema"}]}]},{"type":"tableCell","attrs":{"colspan":1,"rowspan":1},"content":[{"type":"paragraph","content":[{"type":"text","text":"requires "},{"type":"text","text":"additionalProperties: false","marks":[{"type":"code"}]},{"type":"text","text":" and a "},{"type":"text","text":"required","marks":[{"type":"code"}]},{"type":"text","text":" list"}]}]}]}]},{"type":"paragraph","content":[{"type":"text","text":"A tool description is a \"man page\", not a place for shouting. \"Use it whenever the customer asks where an order is\" works better than \"YOU MUST ALWAYS USE THIS TOOL\", which on new models leads to overusing the tool. Instructions like \"never answer allergen questions from memory\" do make sense, though, when they carry a reason (recipes change)."}]},{"type":"heading","attrs":{"level":2,"id":"the-tool-use-loop-step-by-step"},"content":[{"type":"text","text":"The tool use loop step by step"}]},{"type":"orderedList","attrs":{"start":1},"content":[{"type":"listItem","content":[{"type":"paragraph","content":[{"type":"text","text":"You send the messages and the list of tools."}]}]},{"type":"listItem","content":[{"type":"paragraph","content":[{"type":"text","text":"If the model wants to use a tool, the response has "},{"type":"text","text":"stop_reason: \"tool_use\"","marks":[{"type":"code"}]},{"type":"text","text":" and contains one or more "},{"type":"text","text":"tool_use","marks":[{"type":"code"}]},{"type":"text","text":" blocks with an "},{"type":"text","text":"id","marks":[{"type":"code"}]},{"type":"text","text":", "},{"type":"text","text":"name","marks":[{"type":"code"}]},{"type":"text","text":" and "},{"type":"text","text":"input","marks":[{"type":"code"}]},{"type":"text","text":"."}]}]},{"type":"listItem","content":[{"type":"paragraph","content":[{"type":"text","text":"You append the "},{"type":"text","text":"whole","marks":[{"type":"bold"}]},{"type":"text","text":" assistant response to the history (thinking and "},{"type":"text","text":"tool_use","marks":[{"type":"code"}]},{"type":"text","text":" blocks included – unchanged)."}]}]},{"type":"listItem","content":[{"type":"paragraph","content":[{"type":"text","text":"You execute every call and build "},{"type":"text","text":"tool_result","marks":[{"type":"code"}]},{"type":"text","text":" blocks with the matching "},{"type":"text","text":"tool_use_id","marks":[{"type":"code"}]},{"type":"text","text":". You mark failures with "},{"type":"text","text":"is_error: true","marks":[{"type":"code"}]},{"type":"text","text":" and a readable message."}]}]},{"type":"listItem","content":[{"type":"paragraph","content":[{"type":"text","text":"You send "},{"type":"text","text":"all","marks":[{"type":"bold"}]},{"type":"text","text":" results in one user message and return to step 2 – until the model answers with text ("},{"type":"text","text":"end_turn","marks":[{"type":"code"}]},{"type":"text","text":") or you run out of rounds."}]}]}]},{"type":"codeGroup","attrs":{"title":"A hand-written tool use loop"},"content":[{"type":"codeBlock","attrs":{"language":"python","filename":"order_assistant.py"},"content":[{"type":"text","text":"import anthropic\n\nclient = anthropic.Anthropic()\n\n# Stand-ins for the real order service and menu database.\nORDERS = {\"1042\": {\"customer_id\": \"c-7\", \"status\": \"in_delivery\", \"eta_minutes\": 12}}\nALLERGENS = {\"spinach pierogi\": [\"gluten\", \"milk\", \"walnuts\"], \"ruskie pierogi\": [\"gluten\", \"milk\"]}\n\nTOOLS = [\n    {\n        \"name\": \"get_order_status\",\n        \"description\": \"Returns status and ETA of one of the signed-in customer's orders. \"\n        \"Use it whenever the customer asks where an order is or when it will arrive.\",\n        \"strict\": True,\n        \"input_schema\": {\n            \"type\": \"object\",\n            \"properties\": {\"order_id\": {\"type\": \"string\", \"description\": \"Order number without '#', e.g. 1042\"}},\n            \"required\": [\"order_id\"],\n            \"additionalProperties\": False,\n        },\n    },\n    {\n        \"name\": \"check_allergens\",\n        \"description\": \"Returns the allergens of a menu item. Use it for every question about \"\n        \"ingredients or allergies - menu recipes change, so never answer those from memory.\",\n        \"strict\": True,\n        \"input_schema\": {\n            \"type\": \"object\",\n            \"properties\": {\"dish\": {\"type\": \"string\", \"description\": \"Dish name as on the menu\"}},\n            \"required\": [\"dish\"],\n            \"additionalProperties\": False,\n        },\n    },\n]\n\n\ndef run_tool(name: str, args: dict, customer_id: str) -> str:\n    if name == \"get_order_status\":\n        order = ORDERS.get(args[\"order_id\"])\n        # Authorization lives in code: the model never decides whose data it may see.\n        if order is None or order[\"customer_id\"] != customer_id:\n            raise LookupError(f\"No order {args['order_id']} for this customer.\")\n        return f\"status={order['status']}, eta={order['eta_minutes']} min\"\n    if name == \"check_allergens\":\n        allergens = ALLERGENS.get(args[\"dish\"].lower())\n        if allergens is None:\n            raise LookupError(f\"Unknown dish '{args['dish']}'. Ask the customer to pick from the menu.\")\n        return \", \".join(allergens)\n    raise LookupError(f\"Unknown tool {name}\")\n\n\ndef answer(question: str, customer_id: str, max_rounds: int = 5) -> str:\n    messages = [{\"role\": \"user\", \"content\": question}]\n    for _ in range(max_rounds):\n        response = client.messages.create(\n            model=\"claude-opus-5-5\", max_tokens=4096, tools=TOOLS, messages=messages\n        )\n        if response.stop_reason != \"tool_use\":\n            if response.stop_reason in (\"max_tokens\", \"refusal\"):\n                raise RuntimeError(f\"Stopped early: {response.stop_reason}\")\n            return \"\".join(b.text for b in response.content if b.type == \"text\")\n\n        messages.append({\"role\": \"assistant\", \"content\": response.content})\n        results = []\n        for block in response.content:  # the model may request several tools at once\n            if block.type != \"tool_use\":\n                continue\n            try:\n                output = run_tool(block.name, block.input, customer_id)\n                results.append({\"type\": \"tool_result\", \"tool_use_id\": block.id, \"content\": output})\n            except LookupError as err:\n                results.append({\"type\": \"tool_result\", \"tool_use_id\": block.id, \"content\": str(err), \"is_error\": True})\n        messages.append({\"role\": \"user\", \"content\": results})  # all results in ONE message\n    raise RuntimeError(\"Too many tool rounds\")\n\n\nprint(answer(\"Where is order #1042, and do the spinach pierogi contain nuts?\", customer_id=\"c-7\"))"}]},{"type":"codeBlock","attrs":{"language":"typescript","filename":"order-assistant.ts"},"content":[{"type":"text","text":"import Anthropic from \"@anthropic-ai/sdk\";\n\nconst client = new Anthropic();\n\n// Stand-ins for the real order service and menu database.\nconst ORDERS: Record<string, { customerId: string; status: string; etaMinutes: number }> = {\n  \"1042\": { customerId: \"c-7\", status: \"in_delivery\", etaMinutes: 12 },\n};\nconst ALLERGENS: Record<string, string[]> = { \"spinach pierogi\": [\"gluten\", \"milk\", \"walnuts\"] };\n\nconst tools: Anthropic.Tool[] = [\n  {\n    name: \"get_order_status\",\n    description:\n      \"Returns status and ETA of one of the signed-in customer's orders. \" +\n      \"Use it whenever the customer asks where an order is or when it will arrive.\",\n    strict: true,\n    input_schema: {\n      type: \"object\",\n      properties: { order_id: { type: \"string\", description: \"Order number without '#', e.g. 1042\" } },\n      required: [\"order_id\"],\n      additionalProperties: false,\n    },\n  },\n  {\n    name: \"check_allergens\",\n    description:\n      \"Returns the allergens of a menu item. Use it for every question about ingredients \" +\n      \"or allergies - menu recipes change, so never answer those from memory.\",\n    strict: true,\n    input_schema: {\n      type: \"object\",\n      properties: { dish: { type: \"string\", description: \"Dish name as on the menu\" } },\n      required: [\"dish\"],\n      additionalProperties: false,\n    },\n  },\n];\n\nfunction runTool(name: string, input: Record<string, string>, customerId: string): string {\n  if (name === \"get_order_status\") {\n    const order = ORDERS[input.order_id];\n    // Authorization lives in code: the model never decides whose data it may see.\n    if (!order || order.customerId !== customerId) throw new Error(`No order ${input.order_id} for this customer.`);\n    return `status=${order.status}, eta=${order.etaMinutes} min`;\n  }\n  if (name === \"check_allergens\") {\n    const allergens = ALLERGENS[input.dish.toLowerCase()];\n    if (!allergens) throw new Error(`Unknown dish '${input.dish}'. Ask the customer to pick from the menu.`);\n    return allergens.join(\", \");\n  }\n  throw new Error(`Unknown tool ${name}`);\n}\n\nexport async function answer(question: string, customerId: string, maxRounds = 5): Promise<string> {\n  const messages: Anthropic.MessageParam[] = [{ role: \"user\", content: question }];\n  for (let round = 0; round < maxRounds; round++) {\n    const response = await client.messages.create({ model: \"claude-opus-5-5\", max_tokens: 4096, tools, messages });\n    if (response.stop_reason !== \"tool_use\") {\n      if (response.stop_reason === \"max_tokens\" || response.stop_reason === \"refusal\") {\n        throw new Error(`Stopped early: ${response.stop_reason}`);\n      }\n      return response.content.flatMap((b) => (b.type === \"text\" ? [b.text] : [])).join(\"\");\n    }\n\n    messages.push({ role: \"assistant\", content: response.content });\n    const results: Anthropic.ToolResultBlockParam[] = [];\n    for (const block of response.content) {\n      if (block.type !== \"tool_use\") continue; // the model may request several tools at once\n      try {\n        const output = runTool(block.name, block.input as Record<string, string>, customerId);\n        results.push({ type: \"tool_result\", tool_use_id: block.id, content: output });\n      } catch (err) {\n        results.push({ type: \"tool_result\", tool_use_id: block.id, content: String(err), is_error: true });\n      }\n    }\n    messages.push({ role: \"user\", content: results }); // all results in ONE message\n  }\n  throw new Error(\"Too many tool rounds\");\n}\n\nconsole.log(await answer(\"Where is order #1042, and do the spinach pierogi contain nuts?\", \"c-7\"));"}]},{"type":"codeBlock","attrs":{"language":"csharp","filename":"OrderAssistant.cs"},"content":[{"type":"text","text":"using System.Text.Json;\nusing Anthropic;\nusing Anthropic.Models.Messages;\n\nAnthropicClient client = new();\n\n// Raw JSON Schema; strict tools need additionalProperties: false.\nstatic InputSchema Schema(string json) =>\n    InputSchema.FromRawUnchecked(JsonSerializer.Deserialize<Dictionary<string, JsonElement>>(json)!);\n\nList<ToolUnion> tools =\n[\n    new Tool\n    {\n        Name = \"get_order_status\",\n        Description = \"Returns status and ETA of one of the signed-in customer's orders. \" +\n                      \"Use it whenever the customer asks where an order is or when it will arrive.\",\n        Strict = true,\n        InputSchema = Schema(\"\"\"\n            {\"type\":\"object\",\"properties\":{\"order_id\":{\"type\":\"string\",\"description\":\"Order number without '#'\"}},\n             \"required\":[\"order_id\"],\"additionalProperties\":false}\n            \"\"\"),\n    },\n];\n\nstring RunTool(string name, IReadOnlyDictionary<string, JsonElement> input, string customerId)\n{\n    // Authorization lives in code: the model never decides whose data it may see.\n    var orderId = input[\"order_id\"].GetString();\n    if (name == \"get_order_status\" && orderId == \"1042\" && customerId == \"c-7\")\n        return \"status=in_delivery, eta=12 min\";\n    throw new InvalidOperationException($\"No order {orderId} for this customer.\");\n}\n\nList<MessageParam> messages = [new UserMessageParam { Content = \"Where is order #1042?\" }];\nfor (var round = 0; round < 5; round++)\n{\n    var response = await client.Messages.Create(new MessageCreateParams\n    {\n        Model = \"claude-opus-5-5\", MaxTokens = 4096, Tools = tools, Messages = messages,\n    });\n    if (response.StopReason != \"tool_use\")\n    {\n        foreach (var text in response.Content.Select(b => b.Value).OfType<TextBlock>())\n            Console.WriteLine(text.Text);\n        break;\n    }\n\n    // Echo the assistant turn (no ToParam helper in C#) and collect ALL tool results.\n    List<ContentBlockParam> assistant = [];\n    List<ContentBlockParam> results = [];\n    foreach (var block in response.Content)\n    {\n        if (block.TryPickText(out var text)) assistant.Add(new TextBlockParam { Text = text.Text });\n        else if (block.TryPickThinking(out var th))\n            assistant.Add(new ThinkingBlockParam { Thinking = th.Thinking, Signature = th.Signature });\n        else if (block.TryPickToolUse(out var call))\n        {\n            assistant.Add(new ToolUseBlockParam { ID = call.ID, Name = call.Name, Input = call.Input });\n            try\n            {\n                results.Add(new ToolResultBlockParam { ToolUseID = call.ID, Content = RunTool(call.Name, call.Input, \"c-7\") });\n            }\n            catch (Exception ex)\n            {\n                results.Add(new ToolResultBlockParam { ToolUseID = call.ID, Content = ex.Message, IsError = true });\n            }\n        }\n    }\n    messages.Add(new AssistantMessageParam { Content = assistant });\n    messages.Add(new UserMessageParam { Content = results }); // all results in ONE message\n}"}]}]}]},"toc":[{"id":"the-problem-an-assistant-that-guesses-the-order-status","text":"The problem: an assistant that guesses the order status","level":2,"locked":false},{"id":"intuition-the-model-as-a-dispatcher-the-application-as-the-kitchen","text":"Intuition: the model as a dispatcher, the application as the kitchen","level":2,"locked":false},{"id":"the-anatomy-of-a-tool-definition","text":"The anatomy of a tool definition","level":2,"locked":false},{"id":"the-tool-use-loop-step-by-step","text":"The tool use loop step by step","level":2,"locked":false},{"id":"the-tool-runner-a-loop-you-don-t-have-to-write","text":"The tool runner: a loop you don't have to write","level":2,"locked":true},{"id":"tool-choice-strict-and-parallel-calls","text":"tool_choice, strict and parallel calls","level":2,"locked":true},{"id":"client-tools-and-server-tools","text":"Client tools and server tools","level":2,"locked":true},{"id":"the-cost-of-tools-definitions-are-tokens-too","text":"The cost of tools: definitions are tokens too","level":2,"locked":true},{"id":"when-to-use-tools-and-when-not","text":"When to use tools, and when not","level":2,"locked":true},{"id":"pre-production-checklist","text":"Pre-production checklist","level":2,"locked":true},{"id":"test-yourself","text":"Test yourself","level":2,"locked":true},{"id":"what-s-next","text":"What's next","level":2,"locked":true}],"locked":true,"paywall":null,"previewRatio":0.3,"totalBlocks":48,"visibleBlocks":16,"resources":[{"id":"6b0857b33c96f2d34d0b37f1","type":"article","provider":"web","url":"https://www.anthropic.com/engineering/advanced-tool-use","embedUrl":null,"title":"Claude Advanced Tool Use","description":"Claude can now discover, learn, and execute tools dynamically to enable agents that take action in the real world. Here’s how.","author":"@AnthropicAI","thumbnailUrl":"https://assets.claude.com/9a8905b9566374265c6b4c9fa4ac6320db8e31ca.jpg","durationSec":null,"lang":"en","topics":["tool-use"],"techs":["general"],"tags":["ai","hacker-news"],"price":"free","featured":false,"featuredOrder":0,"packageName":null,"source":"hn","publishedAt":"2025-11-24T19:21:35.000Z","popularity":81,"verifiedAt":"2026-11-26T11:19:38.000Z","curated":false,"addedBy":"6b0857a15a2625e44ecaabe6","createdAt":"2026-11-26T16:00:51.221Z","updatedAt":"2026-11-26T16:00:51.221Z"},{"id":"6b0857be3c96f2d34d0b420d","type":"article","provider":"web","url":"https://martinfowler.com/articles/function-call-LLM.html","embedUrl":null,"title":"Function calling using LLMs","description":"Allowing an LLM to formulate calls to external systems","author":"Martin Fowler","thumbnailUrl":"https://martinfowler.com/articles/function-call-LLM/card.png","durationSec":null,"lang":"en","topics":["tool-use"],"techs":["general"],"tags":["martin-fowler","llm","ai"],"price":"free","featured":false,"featuredOrder":0,"packageName":null,"source":"manual","publishedAt":null,"popularity":75,"verifiedAt":"2026-11-26T11:07:20.000Z","curated":false,"addedBy":"6b0857a15a2625e44ecaabe6","createdAt":"2026-11-26T16:00:59.965Z","updatedAt":"2026-11-26T16:00:59.965Z"},{"id":"6b0857b43c96f2d34d0b3855","type":"article","provider":"web","url":"https://sketch.dev/blog/agent-loop","embedUrl":null,"title":"The unreasonable effectiveness of an LLM agent loop with tool use","description":"How a simple loop enables powerful AI assistants","author":"Philip Zeyliger","thumbnailUrl":"https://blog.exe.dev/sketch/media/sketch.dev.png","durationSec":null,"lang":"en","topics":["ai-agents","tool-use"],"techs":["general"],"tags":["llm","ai","hacker-news"],"price":"free","featured":false,"featuredOrder":0,"packageName":null,"source":"hn","publishedAt":"2025-05-15T19:33:44.000Z","popularity":76,"verifiedAt":"2026-11-26T11:18:43.000Z","curated":false,"addedBy":"6b0857a15a2625e44ecaabe6","createdAt":"2026-11-26T16:00:51.221Z","updatedAt":"2026-11-26T16:00:51.221Z"},{"id":"6b0857c83c96f2d34d0b4a51","type":"video","provider":"youtube","url":"https://www.youtube.com/watch?v=Mvcxa35_PMA","embedUrl":"https://www.youtube-nocookie.com/embed/Mvcxa35_PMA","title":"AI Agents In-Depth – Function Calling, MCP and Tool Use Under the Hood - Alan Smith - NDC AI 2026","description":"This talk was recorded at NDC AI in Oslo, Norway. #ndcai #ndcconferences #developer #softwaredeveloper Attend the next NDC conference near you: https://ndcconferences.com https://ndc-ai.com/ Subscribe to our YouTube channel and learn every day: / @NDC Follow our Social Media!…","author":"NDC Conferences","thumbnailUrl":"https://i.ytimg.com/vi/Mvcxa35_PMA/hqdefault.jpg","durationSec":null,"lang":"en","topics":["ai-agents","mcp","tool-use"],"techs":["general"],"tags":["llm","ai"],"price":"free","featured":false,"featuredOrder":0,"packageName":null,"source":"youtube-rss","publishedAt":"2026-07-01T14:29:34.000Z","popularity":56,"verifiedAt":"2026-11-26T11:13:01.000Z","curated":false,"addedBy":"6b0857a15a2625e44ecaabe6","createdAt":"2026-11-26T16:01:10.095Z","updatedAt":"2026-11-26T16:01:10.095Z"},{"id":"6b0857a93c96f2d34d0b324b","type":"repo","provider":"github","url":"https://github.com/anthropics/claude-cookbooks","embedUrl":null,"title":"anthropics/claude-cookbooks","description":"A collection of notebooks/recipes showcasing some fun and effective ways of using Claude.","author":"anthropics","thumbnailUrl":"https://opengraph.githubassets.com/1/anthropics/claude-cookbooks","durationSec":null,"lang":"en","topics":["prompt-engineering","tool-use","rag"],"techs":["python"],"tags":[],"price":"free","featured":false,"featuredOrder":0,"packageName":null,"source":"seed","publishedAt":null,"popularity":95,"verifiedAt":"2026-11-26T00:00:00.000Z","curated":true,"addedBy":"6b0857a15a2625e44ecaabe6","createdAt":"2026-11-26T16:00:41.389Z","updatedAt":"2026-11-26T16:00:41.389Z"}],"challenges":[],"attachments":[],"hasCode":true,"repoUrl":null,"series":[{"slug":"ai-path","title":"AI for developers","items":[{"slug":"llm-fundamentals","title":"LLM fundamentals: tokens, context windows and next-token prediction","current":false},{"slug":"prompt-engineering","title":"Prompt engineering: writing instructions a model will actually follow","current":false},{"slug":"embeddings-vector-db","title":"Embeddings and vector databases: searching by meaning","current":false},{"slug":"rag","title":"RAG: answers grounded in your own documents","current":false},{"slug":"tool-use","title":"Tool use: how a language model calls your application's functions","current":true},{"slug":"ai-agents","title":"AI agents: a model in a loop with tools – and when a plain workflow is enough","current":false},{"slug":"mcp","title":"MCP (Model Context Protocol): one standard for connecting AI to tools and data","current":false},{"slug":"evals","title":"Evaluating LLM applications (evals): tests for systems that are not deterministic","current":false},{"slug":"llm-ops","title":"LLMOps: model gateways, caching, limits, observability and costs in production","current":false},{"slug":"ai-guardrails","title":"Guardrails and security for LLM applications: prompt injection, data leaks and tool permissions","current":false},{"slug":"local-llms","title":"Local language models: Ollama, llama.cpp, vLLM, quantization and the real trade-offs","current":false},{"slug":"fine-tuning","title":"Fine-tuning language models: when it pays off, LoRA and QLoRA in practice","current":false},{"slug":"ai-coding-assistants","title":"AI coding assistants: from editor suggestions to an agent that opens pull requests","current":false}]}],"prev":{"slug":"rag","title":"RAG: answers grounded in your own documents"},"next":{"slug":"ai-agents","title":"AI agents: a model in a loop with tools – and when a plain workflow is enough"},"featured":false,"authorCard":{"id":"6b08bd2e80884893657cc8cf","name":"Redakcja Art of Devs","avatar":null,"handle":"redakcja","headline":"Wzorce projektowe · Architektura · AI i LLM","community":false,"reputation":{"points":3900,"level":{"key":"mentor","label":"Mentor"}},"articles":68,"skills":[{"key":"typescript","title":"TypeScript","level":5,"levelLabel":"Authority","articles":63},{"key":"dotnet","title":".NET","level":5,"levelLabel":"Authority","articles":53},{"key":"python","title":"Python","level":5,"levelLabel":"Authority","articles":52},{"key":"java","title":"Java","level":5,"levelLabel":"Authority","articles":38}]}}