Ends in
00
hrs
00
mins
00
secs
ENROLL NOW

🛍️ $0.99 eBooks Are Here and Save Up to 75% on All Practice Exams & Video Courses

What Is Tool Use / Function Calling in Claude?

Home » Claude Cheat Sheets » What Is Tool Use / Function Calling in Claude?

What Is Tool Use / Function Calling in Claude?

Imagine a customer asks your Claude-powered support assistant, “Where is order A123?” Claude can understand the question, but the latest shipping status lives in your order system. Give Claude an order lookup tool and it can request that record, then use the result to explain where the package is.

What Is Tool Use / Function Calling in Claude?

Tool use, also called function calling, lets Claude request operations provided by your application or by Anthropic. You tell Claude which tools are available and what inputs they expect. When Claude chooses a tool, it generates a structured request with the arguments needed for the operation.

With the default tool_choice setting of auto, Claude can call a tool or answer directly. A question about your return policy may call for a knowledge base search. A question about a specific shipment calls for an order lookup.

Client Tools vs. Server Tools

Understanding Client Tools

Client tools run in your application. You can define a custom tool to check inventory, search internal articles, or retrieve an invoice. Claude requests the operation, and your application checks permissions, runs the corresponding code, and returns the result.

Understanding Server Tools

Server tools run on Anthropic’s infrastructure. For example, Claude can use Anthropic’s web search tool to find public information and cite sources in its answer.

Feature Client tools Server tools
Where execution runs Your application Anthropic’s infrastructure
Typical use Business APIs and internal data Hosted capabilities such as web search
Who handles execution Your application validates and runs the call Anthropic runs the operation

Core Capabilities and How They Work Together

Define the Tool

Tutorials dojo strip

For a custom client tool, the Messages API tool definition includes a name, a description, and an input_schema. The description tells Claude when to use the tool, and the schema describes the arguments it should supply.

Handle the Tool Call

When Claude requests a client tool, the response includes a tool_use block containing the tool name, input, and call ID. Your application validates the arguments, checks the user’s permissions, and routes the request to the corresponding function or API.

Return the Result

Keep Claude’s assistant response in the conversation, then send a user message containing a tool_result block. Its tool_use_idmust match the original call ID. Claude uses that result to respond or request another operation. The Claude SDK’s tool runner can manage this exchange for client tools.

Common Use Cases and Real-World Applications

  • Customer Support – A support assistant can check delivery status or search help-center articles. For an order lookup, the application verifies that the customer can access the order before returning its shipping details.

  • Retail and Inventory – When a shopper asks which stores have a product in stock, Claude can request current inventory for the selected locations and summarize the available options.

  • Web Research – Claude can call Anthropic’s web search tool to find public information that changes over time and cite the sources it used.

Benefits for Developers and Users

Developers can expose specific operations with predictable inputs, then apply their own authorization and logging rules at execution time. Users can ask questions in natural language and receive answers grounded in the systems that hold the relevant data. For workflows with several steps, Claude can use one result to decide which tool to call next.

Getting Started with Claude Tool Use

Start with a read-only client tool such as get_order_status. The following JSON snippets show the tool definition and the exchange your application handles through the Messages API.

Define the Order Lookup Tool

Include this object in the request’s tools array.

{
  "name": "get_order_status",
  "description": "Retrieve the latest shipping status for an order the current customer can access.",
  "input_schema": {
    "type": "object",
    "properties": {
      "order_id": {
        "type": "string",
        "description": "The order identifier provided by the customer."
      }
    },
    "required": ["order_id"]
  }
}
Field Value
name get_order_status
description Retrieve the latest shipping status for an order the current customer can access.
input_schema.type object
order_id property string. The order identifier provided by the customer.
input_schema.required [“order_id”]

Execute the Requested Lookup

If the customer asks about order A123, Claude may return this block. Your application reads the arguments and checks that the authenticated customer can access the order before querying the order system.

{
  "type": "tool_use",
  "id": "toolu_order_lookup",
  "name": "get_order_status",
  "input": {
    "order_id": "A123"
  }
}

Send the Result Back to Claude

Append Claude’s full assistant response to the message history. Add a user message with the following block in its contentarray, then send the conversation back to the Messages API.

{
  "type": "tool_result",
  "tool_use_id": "toolu_order_lookup",
  "content": "Order A123 shipped and is expected to arrive on Tuesday."
}

Claude can then answer, “Your order has shipped and is expected to arrive on Tuesday.”

 

Conclusion

Tool use lets Claude answer questions and complete tasks that depend on external data. In the order-tracking example, Claude requests a lookup for order A123, your application verifies the customer’s access and retrieves the shipping status, and Claude uses the result to explain when the package will arrive.

The same pattern works for checking inventory, searching internal documentation, or retrieving invoices. Claude handles the conversation and generates structured requests, while your application controls what each client tool can access and execute.

 

Reference:

https://platform.claude.com/docs/en/agents-and-tools/tool-use/overview

🛍️ $0.99 eBooks Are Here and Save Up to 75% on All Practice Exams & Video Courses

Tutorials Dojo portal

Turn Your Team Into Cloud-Ready Professionals Today

Tutorials Dojo for Business

Learn AWS with our PlayCloud Hands-On Labs

50% OFF ON OUR YEARLY PLAN

Learn GCP By Doing! Try Our GCP PlayCloud

Learn Azure with our Azure PlayCloud

FREE AI and AWS Digital Courses

FREE AWS, Azure, GCP Practice Test Samplers

SAA-C03 Exam Guide SAA-C03 examtopics AWS Certified Solutions Architect Associate

Subscribe to our YouTube Channel

Tutorials Dojo YouTube Channel

Follow Us On Linkedin

Written by: Ace Kenneth Batacandulo

Ace is AWS Certified, AWS Community Builder, and Cloud Consultant at Tutorials Dojo Pte. Ltd. He is also the Co-Lead Organizer of K8SUG Philippines and a member of the Content Committee for Google Developer Groups Cloud Manila. Ace actively contributes to the tech community through his volunteer work with AWS User Group PH, GDG Cloud Manila, K8SUG Philippines, and Devcon PH. He is deeply passionate about technology and is dedicated to exploring and advancing his expertise in the field.

AWS, Azure, and GCP Certifications are consistently among the top-paying IT certifications in the world, considering that most companies have now shifted to the cloud. Earn over $150,000 per year with an AWS, Azure, or GCP certification!

Follow us on LinkedIn, YouTube, Facebook, or join our Slack study group. More importantly, answer as many practice exams as you can to help increase your chances of passing your certification exams on your first try!

View Our AWS, Azure, and GCP Exam Reviewers Check out our FREE courses

Our Community

~98%
passing rate
Around 95-98% of our students pass the AWS Certification exams after training with our courses.
200k+
students
Over 200k enrollees choose Tutorials Dojo in preparing for their AWS Certification exams.
~4.8
ratings
Our courses are highly rated by our enrollees from all over the world.

What our students say about us?