Commit 661fccc
committed
fix: preserve MCP tools when "default" tools preset is active without explicit tools list
When the "default" preset was used alone (no explicit --tools list),
_apply_tool_filters built an allow_set containing only built-in tool
names, silently stripping all mcp__ prefixed tools. This caused SDK
agents using ToolsPreset to lose access to their registered MCP tools.
Return the full tool list early when preset is "default" and no
explicit tools_list is provided, matching the upstream behaviour where
"default" resolves to the complete set of enabled tools.1 parent ad70e86 commit 661fccc
2 files changed
+7
-3
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
102 | 102 | | |
103 | 103 | | |
104 | 104 | | |
105 | | - | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
106 | 108 | | |
| 109 | + | |
| 110 | + | |
107 | 111 | | |
108 | | - | |
| 112 | + | |
109 | 113 | | |
110 | 114 | | |
111 | 115 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1488 | 1488 | | |
1489 | 1489 | | |
1490 | 1490 | | |
1491 | | - | |
| 1491 | + | |
1492 | 1492 | | |
1493 | 1493 | | |
1494 | 1494 | | |
| |||
0 commit comments