AI Model Wiki

    Skip to main content
    Back to Glossary

    Tool Use in LLMs

    Tool use in LLMs refers to the ability of a large language model to detect when a user's request requires external information or actions, generate a structured invocation of a predefined tool (such as a web search, database query, or code executor), and integrate the returned result into a coherent response. The model is trained or prompted to recognise which tool fits a given sub-task and to produce arguments that conform to that tool's schema—without actually executing anything itself. This separation between reasoning (the model) and execution (the host application) keeps the system safe and auditable.

    Think of it like a surgeon working with a scrub nurse: the surgeon calls out exactly what instrument is needed and the nurse passes it over. The surgeon never leaves the table to fetch tools—focused reasoning stays central while specialists handle retrieval and execution.

    # Anthropic Claude tool-use example
    response = client.messages.create(
        model="claude-opus-4-5",
        tools=[search_tool, calculator_tool],
        messages=[{"role": "user", "content": "What is the population of Tokyo times 3?"}]
    )
    # Claude first calls search_tool for population, then calculator_tool for multiplication
    

    Multi-step chains like this demonstrate how tool-augmented LLMs decompose complex questions into tractable sub-tasks.

    Tool use in LLMs is underpinned by Prompt Engineering that describes available tools and by Chain of Thought reasoning that plans which tools to call in sequence. It also intersects with RAG, where retrieval is itself a tool, and with Inference optimisation because each tool round-trip adds latency.

    You'll encounter this capability whenever you build AI agents, automate multi-step research pipelines, or integrate an LLM into enterprise software that has live APIs or proprietary databases.

    AI Terminology
    Glossary