2.5 · D220 questions · 5 free

Built-in tools: Read, Write, Edit, Bash, Grep, Glob

Select and apply built-in tools (Read, Write, Edit, Bash, Grep, Glob) effectively.

This subtopic (2.5) sits in Tool Design & MCP Integration (D2) on Anthropic's Claude Certified Architect — Foundations (CCA-F) exam. The bank holds 20 practice questions here — 4 easy, 12 medium, and 4 hard — with 5 free to try, answers and explanations included. 3 of the free questions are below; the rest are in the practice stream.

What the exam tests here

  • building codebase understanding incrementally — Grep entry points then Read to trace
  • Edit for targeted modifications — unique text matching; Read+Write as fallback
  • Grep for content search — file contents, function names, error messages
  • Glob for file path pattern matching — by name or extension
Practice this subtopic — 5 freeFree questions with answers ↓

Free practice questions: Built-in tools: Read, Write, Edit, Bash, Grep, Glob

Question 1 of 3 · free · easy

A developer needs to update a single error message string inside process_refund without touching surrounding code. Which built-in tool is the best first choice?

Show answer & explanation

Correct answer: D. Use Edit with unique matching text to replace only the target string

Edit is designed for targeted, surgical changes using unique text anchors — it avoids rewriting unchanged code and minimizes risk of unintended side effects. 'Read the file, modify...' is the fallback when Edit cannot match uniquely. 'Run a Bash sed command...' bypasses the built-in tool layer unnecessarily. 'Use Grep to locate...' adds steps without benefit when Edit handles the task directly.

Question 2 of 3 · free · hard

A billing dispute spike is causing your support agent to misroute cases. You suspect process_refund is being called from a code path that skips policy checks. You need to locate every call site of process_refund across a large Python monorepo before patching. Which approach finds them most reliably?

Show answer & explanation

Correct answer: A. Use Grep with pattern 'process_refund\(' restricted to type python to list every invocation site with line numbers.

Grep with an anchored call-syntax pattern and a language type filter deterministically surfaces every invocation across the monorepo. 'Use Glob with pattern' finds files by name, missing call sites in unrelated filenames. 'Use Bash to run python -c' imports code with side effects and misses dynamic references. 'Use Read on the MCP tool registration' traces declaration not usage, so downstream callers go unseen.

Question 3 of 3 · free · medium

The report generation subagent must locate all Markdown files produced by the synthesis subagent across nested output directories. Which Glob pattern correctly matches only Markdown files by extension regardless of directory depth?

Show answer & explanation

Correct answer: D. **/*.md

**/*.md matches files with the .md extension at any directory depth, which is required when output directories are nested. *.md matches only the current directory, missing nested paths. **/*synthesis*.md over-constrains by requiring a filename substring, excluding other Markdown outputs. **/{*.md,*.txt} expands scope to .txt files, exceeding the requirement.

2 more free questions on this subtopic in the practice stream, plus 15 in the full bank. Keep practicing →

Related reading (Anthropic docs)