Dashboard/Phase 1: Foundations
📖 Concept7 min10 XP

Lesson 4: Tools — How Claude Acts on Your Project

Day 4 of 50 · ~7 min read · Phase 1: Foundations


The Opening Question

You've learned that Claude Code runs an agentic loop: read → reason → act → check. That's the process.

But what actually happens when Claude acts? How does Claude read a file? How does it edit code? How does it run tests?

The answer: tools. Tools are the hands of the agent.

Here's today's question: What's the difference between Claude thinking something and Claude doing something?


Discovery

Let's think about this concretely.

Question 1: What can Claude do that a chatbot can't?

You've used ChatGPT or Claude.ai. You ask it a question, it generates text, and that's it. It can't actually do anything.

But Claude Code can act. It can change your files. It can run your test suite. It can search your codebase.

What's the thing that makes that possible?

Pause and think: If you wanted to let an AI do things in the real world, what would you need to give it access to?

The answer is: tools. Tools are interfaces between Claude's thinking and the real world.

When Claude thinks "I need to read the package.json file," it can't just magically see that file. Instead, it uses the "Read" tool. It says: "I want to read /Users/you/project/package.json." The tool fetches that file, and Claude sees the contents.

When Claude thinks "I need to change this variable name," it can't just rewrite the file. Instead, it uses the "Edit" tool. It says: "Replace oldName with newName in this file." The tool makes that change.

Tools are how thinking becomes doing.

Question 2: What are Claude's built-in tools?

Claude Code comes with a set of standard tools. Let's walk through the main ones:

Read — Open a file and see its contents. Claude uses this to understand your code, read configuration files, look at logs, anything that requires examining what exists.

Write — Create a new file or completely replace an existing one. Useful for new files, but less precise than Edit for making targeted changes.

Edit — The precision tool. Claude provides the exact text it wants to replace ("old_string") and what it should become ("new_string"). This is how Claude makes surgical changes without rewriting entire files.

Bash — Run shell commands. npm test, git log, docker build, whatever you'd run in your terminal. Claude can execute commands and see their output.

Glob — Find files by pattern. Instead of Claude asking you "where's your test file?", it can use Glob to search for **/*.test.js and find all tests at once.

Grep — Search for text inside files. If Claude needs to find where a function is defined, it can Grep for the function name across your whole project.

WebSearch — Search the internet. If Claude needs to look up documentation or check the current behavior of a library, it can search the web.

WebFetch — Fetch the content of a URL. If Claude needs to read documentation from a specific page, it can fetch it and analyze it.

Does that cover everything? Not necessarily. But these are the fundamental tools that let Claude read, search, edit, and act on your project.

Question 3: Why would Claude show you the tool calls?

Here's something important: in your conversation with Claude Code, you can see every tool call Claude makes.

For example, Claude might show you:

I'm going to read your current package.json to see what dependencies you have.
[Read: /Users/you/project/package.json]

Then you see the contents of that file.

Why would Claude show you this instead of just doing it silently?

Pause and think: What could go wrong if Claude just secretly used tools without telling you?

There are several reasons to be transparent:

  1. Trust. You can see exactly what Claude is looking at and verify it's relevant to your task.
  2. Control. If Claude is about to read a sensitive file, you can object before it happens.
  3. Debugging. If Claude misunderstands something, you can see which file it read and correct it.
  4. Learning. As you watch Claude use tools, you learn how to think like an agent.

This transparency is a key principle of Claude Code: the agent works out loud.

Question 4: How are tools connected to the agentic loop?

Let's connect this back to Lesson 3. Remember the loop: read → reason → act → check.

Where do tools fit in?

  • Read phase: Claude uses Read, Glob, Grep, WebFetch to gather information
  • Reason phase: Claude thinks (no tools needed)
  • Act phase: Claude uses Edit, Write, Bash to make changes
  • Check phase: Claude uses Read, Bash, Glob to verify the change worked

Tools enable every part of the loop except reasoning. And because the tools are transparent, you can watch the loop happen.


The Insight

Here's the core idea:

Tools are the interface between Claude's thinking and your project. They let Claude read files, search code, edit files, and run commands — turning abstract reasoning into concrete action. Transparency about tool use lets you see the agentic loop in action and stay in control.

The mental model: Tools are Claude's hands and eyes. Without tools, Claude is a brilliant but paralyzed thinker. With tools, Claude can actually do things. And by showing you every tool use, Claude lets you watch what it's doing and step in if needed.


Try It

Let's watch Claude use different tools in one conversation.

  1. Start a new conversation in your Claude Code terminal: claude

  2. Ask Claude to do something that requires multiple tools:

    • "In this project, find the main configuration file and tell me what it does"
    • This should use: Glob (to find likely config files), possibly Grep (to search), and Read (to view the content)
  3. Watch the conversation. You'll see Claude call different tools. It might say:

    • "[Glob: **/*.config.js]" — showing it's finding files by pattern
    • "[Read: /path/to/config.js]" — showing it's reading a file
  4. Ask a follow-up question: "Show me all the environment variables defined in our configuration"

    • Watch Claude use Grep to search
    • Watch Claude read the relevant files
    • Watch Claude synthesize the answer

You're seeing tools power the agentic loop in real-time.


Key Concepts Introduced

ConceptDefinition
ToolAn interface that lets Claude interact with your project (Read, Write, Edit, Bash, Glob, Grep, WebSearch, WebFetch)
Read toolDisplays the contents of a file
Edit toolMakes precise text replacements within a file using old_string → new_string
Write toolCreates a new file or replaces an entire file
Bash toolExecutes shell commands and returns their output
Glob toolFinds files matching a pattern (e.g., **/*.test.js)
Grep toolSearches for text inside files across your project
Tool transparencyClaude shows you every tool call, letting you see exactly what it's reading, searching, and doing

Bridge to Lesson 5

You now understand that tools are how Claude acts. But before Claude can act effectively, it needs to understand your codebase.

When Claude navigates a project it's never seen before, how does it find what it's looking for? How does it avoid getting lost in thousands of files?

Tomorrow's question: How does Claude understand a codebase it's never seen?

We'll explore reading code — using Glob and Grep to navigate, finding relevant files, and building understanding about project structure.


← Back to Curriculum · Lesson 5 →