How Claude Uses Tools to Get Data and Run Code in Your App 0 ▲ Write Software Well 9 minutes ago · 31 min read6210 words · Tech · hide In the previous post, we saw how a large language model like Claude works. Your application can use Claude by sending HTTP requests to the Claude API, which Anthropic runs. The model can't query your database, call your APIs, or run any of your code. All it can do is read the text you send it and write text back. Yet you've used AI features that look up records, search the web, or edit your code in a local repo. They're all built on a feature of the Claude API called tool use. With tool use, Claude doesn't run your code. It asks your app to run it, and your app decides whether to run it or not.In this post, we'll build that tool exchange to learn what goes back and forth between your app and the Claude API so it can execute your code and access your data that it can't see otherwise. We'll start with server tools like web search, which Anthropic runs for you. Then we'll define a client tool that looks up a customer in our database, run it when Claude asks, and send the result back.… Commenting on Bubbles has been removed. Why? If you want to talk about this post, write to the author, use the comments on their blog if it has them, or reply with a "RE:" post on your own blog. Suggestions? feedback@bubbles.town