// Guides

Using Tools — Bash, Web Search, and Everything Else

Core Workflows: Using Tools — Bash, Web Search, and Everything Else

12 April 2026 claude tutorial core-workflows

Using Tools — Bash, Web Search, and Everything Else

Series: Claude Learning Journey · Core Workflows

Claude with file access is useful. Claude with tools is powerful. A tool is a function Claude can call to do something outside the conversation — run a shell command, search the web, fetch a URL, generate an image, send a message. The tool system is how Claude crosses from conversation into action.

How tools work

You do not call tools directly. You ask Claude to do something, and if the request requires a tool, Claude decides which tool to use, calls it with appropriate arguments, reads the result, and continues. The whole exchange looks like a normal conversation until you realise Claude just ran 15 shell commands while you were thinking.

Example:

You: "Run the tests for the payments module and tell me if anything failed."
Claude: Running the payments tests now.
[npm test -- --testPathPattern=payments]
Claude: All 23 tests in the payments module passed. No failures.

Claude read the test output, extracted the relevant information, and returned a human-readable summary. You did not have to run the command yourself.

When Claude runs commands

When a task calls for it, Claude can run shell commands on your behalf. This means:

Running tests: Ask Claude to run your test suite and summarise the results.

Git operations: “Check what changed in the last 10 commits” or “Show me uncommitted changes.”

Searching code: “Find everywhere this function is called” or “Show me all places that handle errors.”

Reading logs: “Show me the last 50 lines of the server log.”

Claude reads the output and uses it to inform its response. You do not need to run the commands yourself or paste the output back into the conversation.

This capability is most powerful when combined with file access — Claude can read a file, identify a problem, run a command to confirm its hypothesis, and suggest a fix all in one exchange.

The web search tool sends a query to a search engine and returns a list of results. Claude uses this when you ask about something that requires current information, or when you want to verify something against live documentation.

You: "What is the current stable version of Next.js?"
Claude: [calls web search for "Next.js latest stable version 2026"]
Claude: "Next.js 15.3 is the current stable release as of April 2026."

Web search is useful for:

  • Checking library version compatibility
  • Reading documentation for libraries you have not used before
  • Finding code examples for a specific API
  • Verifying that something you read online is still accurate

Reading URLs

The fetch tool retrieves the content of a URL. This is more precise than search — you have found a specific page and want Claude to read it.

You: "Read the Django 5.0 release notes and tell me what changed in migrations."
Claude: [fetches https://docs.djangoproject.com/en/5.0/releases/5.0/]
Claude: [extracts migration-related changes from the page]

Pair fetch with search: search finds the right page, fetch reads it in full.

When to use tools vs when to ask

A useful heuristic: if you know what command to run, ask Claude to run it. If you do not know what command to run, describe what you want to achieve and let Claude figure out the command.

You (expert mode): "Run a `git log --oneline -20` on the gather repo and show me recent commits."
You (exploratory mode): "I haven't touched this Go project in 6 months. What's the overall structure and how do I run the tests?"

Claude will use exec and read tools to explore and give you a summary even when you do not know where to start.

Tool use that requires caution

Claude can run commands, which means it can do real things in your environment. Treat this the same way you would a colleague who has access to run things on your machine.

Claude will generally refuse clearly destructive requests without confirmation, but you should always review what Claude is planning to do before approving it. Check the file changes, read the commands it wants to run, and satisfy yourself that the approach makes sense before saying go ahead.

If you are working in a sensitive environment (production systems, shared accounts), use Claude in read-only mode for initial exploration and only enable write access when you are ready to act on the results.

Try it yourself

Open the Claude app and pick a task you do regularly — running tests, checking git status, reading documentation. Instead of opening a terminal, ask Claude to do it and describe what it finds. Notice how the exchange stays conversational while Claude handles the underlying commands.

What’s Next

Claude sessions are stateless by default — each new session starts fresh. The next post covers memory — how to make Claude remember things across sessions so you are not starting from scratch every time.


Part of the Claude Learning Journey series · Next: Memory and Continuity Across Sessions