-
Notifications
You must be signed in to change notification settings - Fork 3.9k
Description
Summary
Currently, custom agents support whitelisting tools via allowed_tools in YAML frontmatter. This works well for highly constrained agents, but for multi-agent orchestration patterns, the inverse is often more practical: allow everything EXCEPT specific tools.
Use Case
In multi-agent architectures, orchestrator agents often need broad capabilities but should delegate certain specialized tasks to sub-agents rather than handling them directly.
Example: An orchestrator agent should be able to read files, run bash, search code, etc., but should NOT directly use gh commands - those should be delegated to a GitHub-specialist agent who has better context for that domain.
Current workaround: Whitelist every tool except the ones you want to exclude. This is brittle and requires updating whenever new tools are added.
Desired: denied_tools or similar that excludes specific tools while allowing everything else.
Proposed Schema
Building on the discussion in #4380 (specifically this comment), something like:
---
denied_tools:
- gh
- Task
---Or the more expressive allow/deny/ask model:
{
"permissions": {
"allow": ["*"],
"deny": ["gh", "mcp__github"]
}
}Benefits
- Encourages delegation - Agents naturally route specialized tasks to specialists
- Simpler configuration - No need to enumerate all allowed tools
- Future-proof - New tools automatically available unless explicitly denied
- Better orchestration patterns - Supports hierarchical agent architectures
Related Issues
- Feature: Per-agent MCP tool filtering to improve agent focus and accuracy #4380 - Per-agent MCP tool filtering
- Implement Agent-Scoped MCP Configuration with Strict Isolation #4476 - Agent-Scoped MCP Configuration
- Allow MCP tools to be available only to subagent #6915 - MCP tools available only to subagent
Those issues focus primarily on whitelisting. This request specifically addresses the blacklist/deny case for orchestration workflows.
Happy to provide more detailed examples of multi-agent workflows where this pattern would help.