CCAR-F - Tool Design & MCP Integration (18% of the exam) - Section 2.5

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

Grep searches file contents for patterns such as function names, error strings or imports; Glob matches file paths by name or extension; Read and Write handle whole files while Edit makes targeted changes through unique text matching, falling back to Read plus Write when no unique anchor exists. Candidates should build codebase understanding incrementally, starting from Grep entry points and following imports with Read, rather than loading every file upfront.

Grep for content searchGlob for path patternsEdit unique text matchingRead plus Write fallbackincremental codebase exploration

Practice question for this objective

Free sampleTool Design & MCP Integrationeasy

The Northgate integrations team uses an agent to add a timeout field to a client module of roughly 2,000 lines in a legacy payments service. The agent reads part of the module, then calls the Write tool on that path with a payload containing the new field and the surrounding class. Afterwards the module on disk is 40 lines long and the rest of the original code is gone, although the tool call itself reported success. What does that tell the team about the Write tool?

  • AWrite replaces the entire contents of the target path with exactly the text supplied, so anything the agent did not include in that call is lost rather than merged with the existing file. Correct
  • BWrite appends its payload to the end of an existing file, so the original body is still present further down and the visible 40 lines are only the newest section of the module.
  • CWrite applies its payload as a patch relative to the last read of the file, so the missing body was dropped because the file on disk changed between that read and the write.
  • DWrite refuses a payload larger than a single call allows, so the tool kept the first 40 lines of what was supplied and quietly discarded the remainder of the module before saving.
Write overwrites a whole file with exactly the supplied text, so targeted changes to existing files belong to Edit rather than Write. Write has whole-file semantics: the path ends up holding precisely the payload and nothing more. A successful Write therefore confirms only that the supplied text was saved, not that the rest of the module was preserved, which is why a partial rewrite of a long file silently destroys the untouched code.

Why A is correct: Write is a whole-file operation, so its success signal means the supplied text was saved in full and nothing else survives; a targeted change to an existing file belongs to Edit instead.

Why B is wrong: Append is a familiar file operation and would explain a successful call, but the team can see that the earlier code is absent, so the payload clearly did not land after it.

Why C is wrong: Read-then-write races are a real hazard, which makes this plausible, but Write is not a patch operation and no concurrent change is needed to explain the loss.

Why D is wrong: Payload limits exist on some tools, so this reads as a reasonable failure mode, but the truncation here is of the original file rather than of the agent's payload.

See more CCAR-F practice questions, answers explained.

Exam traps in Tool Design & MCP Integration

Answers that look right on this material and are not. Each one is a distractor from a different question in the CCAR-F bank for this domain.

  • Keep the recursive Bash search but pipe its output through a line limit so that only the first 200 matching lines are returned into the session.

    Why it is wrong: Truncating the output does bound the context cost, which is why it is tempting, but it discards matches arbitrarily by file order and the assistant then reports a caller list that is quietly incomplete.

  • Broaden the Glob pattern to every file extension in the repository, on the basis that the pattern was excluding the files that hold the imports.

    Why it is wrong: Widening a pattern is the usual fix for a search that misses files, but the review found the missing files inside the covered directory with the covered extension, so the pattern was never the limiting factor.

  • Have the coordinator read each subagent's output at the end of every stage and restore any file in the shared workspace whose contents changed unexpectedly during that stage.

    Why it is wrong: Tempting because it recovers the lost notes, but a repair step after the fact still allows the write to happen and depends on the coordinator noticing the change at all.

More in this domain

Back to all Tool Design & MCP Integration objectives, or the CCAR-F cert hub.

Examworthy is not affiliated with or endorsed by Anthropic. Original, blueprint-aligned practice material only.