By Abhijith N M · Reviewed 24 October 2026 · Editorial standards
A research subagent shipped with four tools: search, read a page, fetch a document and summarise. Three months later it has nineteen, because every team added one. During a review, an engineer notices the researcher can also issue a refund.
Nothing was hacked and no single change was reckless. The tool list grew because nobody owned it. Each addition was reasonable on its own and wrong in aggregate.
The exam calls this tool distribution. The rule is least privilege: give each agent the tools its job needs, and nothing else. A tool the agent does not have is a failure mode you cannot have.
A tool list is a security boundary that looks like a configuration detail. That is why the same question appears in more than one exam scenario.
It is riskier, and the scenario is subtle. The coordinator reads a customer's message, decides a refund is fair, and calls the refund tool itself. Now two agents can move money, and the audit trail no longer tells you which one did.
Do not hand out tools and then write job descriptions. List the actions first, then decide which single agent owns each one. If two agents own one action, you have two writers and no owner.
| Action | Owner | Who may read the result |
|---|---|---|
| Read one customer record | Resolver | Researcher, read-only |
| Issue a refund | Resolver | Resolver only |
| Spawn a subagent | Coordinator | Coordinator only |
| Escalate to a human | Resolver | Supervisor |
| Summarise a ticket | Researcher | Resolver |
Ownership is the part people skip. A write tool behind two agents looks like flexibility and behaves like a race. When the audit log says a refund happened, you need one name to call.
Do not subtract from everything. Build up from nothing. An allow-list names the tools an agent may call, and anything not named is unavailable, including tools that someone adds next month.
In the Agent SDK this is the allowedTools option on the query. In Claude Code, a subagent declares a tools field in its frontmatter, and permission rules cover the rest. The name changes between products and the shape does not: empty by default, explicit grants, and a deny that wins over any allow.
ALLOWED_TOOLS = {
"coordinator": ["Task"],
"researcher": ["crm__get_customer", "orders__lookup_order"],
"resolver": [
"crm__get_customer",
"orders__lookup_order",
"orders__process_refund",
"support__escalate_to_human",
],
}
def can_call(agent, tool_name):
return tool_name in ALLOWED_TOOLS.get(agent, [])
print(can_call("researcher", "orders__process_refund"))
print(can_call("resolver", "orders__process_refund"))
print(can_call("researcher", "crm__get_customer"))Notice the double underscore in the tool names. It marks the server that publishes the tool, so orders__lookup_order and billing__lookup_order stay distinct. The next section explains where those servers come from.
The double underscore is a convention, not a schema rule. What matters is that the short name is unique in the aggregated list and stays stable, because the model learns it once and reuses it every turn.
Namespacing finishes the job. A client that aggregates tools from several servers can receive two tools with the same short name: two servers may both publish search. Prefix by server, as the allow-list above does, or accept the client's convention. Claude Code exposes MCP tools as mcp__server__tool for exactly this reason.
A tool that changes state deserves more thought than a tool that reads. The asymmetry is the point: reading is cheap to share, and writing is the thing you will be asked about after an incident.
Prompt-level restraint is not a boundary. If the tool is in the list and the model can call it, then a clever request, a confused turn or a prompt injection can call it. The allow-list is a boundary because the call never reaches the tool, so the model cannot succeed by persuasion.
Now look at the grant map for the support system. The same graph answers the review question: who can reach which action?
Key takeaways
Least privilege: each agent gets the tools its job needs and nothing else.
Assign one owner per action before you assign tools, so two agents never write the same state.
Use an allow-list such as allowedTools; empty by default, explicit grants, deny wins.
Researchers get read-only tools and only the owning agent gets the write tool.
A prompt instruction is not a boundary, and namespacing keeps a shared tool list from colliding.
Written and edited by the nexGenCoders team. Spotted a mistake? Tell us and we will fix it.
Don't lose this lesson
Create a free account to save your progress, keep your streak, and work toward a shareable certificate.