C.W.K.
Stream
Lesson 04 of 08 · published

The Default Tool Set: What You Get for Free

~14 min · tools, default-tools, filesystem, bash

Level 0Observer
0 XP0/64 lessons0/13 achievements
0/150 XP to next level150 XP to go0% complete

The Agent SDK ships its own tools

Out of the box, the Agent SDK provides filesystem and shell tools that mirror what Claude Code gives a human user — Read, Write, Edit, Bash, Glob, Grep, WebFetch, Task, NotebookEdit, and others. The model selects them like any other tool; permission prompts gate them by default.

Tools have their own discipline

Read reads files (with size and offset controls). Write creates new files. Edit performs string replacements; you must read a file first before editing it. Bash runs shell commands inside the cwd. Glob matches paths; Grep searches contents. Each has options that affect cost and safety.

Whitelist, do not blacklist

If your agent only needs to read and search, declare exactly that. The default set is broad on purpose; in production agents you should narrow aggressively and document the reason. cwkPippa's Pippa allows the full set because she is a pair-programming companion; a customer-service agent should not have Bash.

Principle: Tool capability is permission. Audit it like permission, not like a feature flag.

Code

Common allowed_tools combinations·python
# Read-only auditor
READ_ONLY = ["Read", "Grep", "Glob", "WebFetch"]

# Documentation editor (read + edit, no shell, no new file creation)
DOC_EDITOR = ["Read", "Grep", "Glob", "Edit"]

# Pair programmer (full set, but no Task delegation)
PAIR_PROGRAMMER = [
    "Read", "Write", "Edit",
    "Glob", "Grep", "WebFetch",
    "Bash", "NotebookEdit",
]

# Just bash, for a sysadmin assistant
SYSADMIN = ["Bash", "Read"]
Edit requires a prior Read in the same session·python
# The Agent SDK's Edit tool will refuse if the file has not been Read this session.
# This is by design — it forces the model to look at current contents before changing.
# Your code does not need to enforce this; the SDK does.
#
# Implication: if you reset the session (new ClaudeSDKClient), the model needs to re-read.
# This is exactly the safety guarantee of session-scoped state.

External links

Exercise

List every Agent SDK tool your agent can call right now. For each, write one sentence justifying its presence. Remove any you cannot justify.
Hint
If 'in case the model needs it' is your justification, that is not a justification — that is a permission posture problem.

Progress

Progress is local-only — sign in to sync across devices.
Spotted a bug or have feedback on this page?Report an Issue

Comments 0

🔔 Reply notifications (sign in)
Sign inPlease sign in to comment.

No comments yet — be the first.