Skip to content

Commit b99a2f0

Browse files
Merge pull request #218 from docker/slim/dynamictools1
Enable Dynamic Tools by Default and Enhance MCP Management
2 parents 7145062 + 94ec997 commit b99a2f0

File tree

7 files changed

+677
-400
lines changed

7 files changed

+677
-400
lines changed

cmd/docker-mcp/commands/gateway.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -320,12 +320,12 @@ func isMcpOAuthDcrFeatureEnabled(dockerCli command.Cli) bool {
320320
func isDynamicToolsFeatureEnabled(dockerCli command.Cli) bool {
321321
configFile := dockerCli.ConfigFile()
322322
if configFile == nil || configFile.Features == nil {
323-
return false // Default disabled when no config exists
323+
return true // Default enabled when no config exists
324324
}
325325

326326
value, exists := configFile.Features["dynamic-tools"]
327327
if !exists {
328-
return false // Default disabled when not in config
328+
return true // Default enabled when not in config
329329
}
330330

331331
return value == "enabled"

cmd/docker-mcp/commands/gateway_test.go

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -88,31 +88,31 @@ func TestIsDynamicToolsFeatureEnabled(t *testing.T) {
8888
Features: map[string]string{},
8989
}
9090
enabled := isDynamicToolsFeatureEnabledFromConfig(configFile)
91-
assert.False(t, enabled, "should return false when dynamic-tools is not set")
91+
assert.True(t, enabled, "should return true when dynamic-tools is not set (default enabled)")
9292
})
9393

9494
t.Run("nil config", func(t *testing.T) {
9595
enabled := isDynamicToolsFeatureEnabledFromConfig(nil)
96-
assert.False(t, enabled, "should return false when config is nil")
96+
assert.True(t, enabled, "should return true when config is nil (default enabled)")
9797
})
9898

9999
t.Run("nil features", func(t *testing.T) {
100100
configFile := &configfile.ConfigFile{
101101
Features: nil,
102102
}
103103
enabled := isDynamicToolsFeatureEnabledFromConfig(configFile)
104-
assert.False(t, enabled, "should return false when features is nil")
104+
assert.True(t, enabled, "should return true when features is nil (default enabled)")
105105
})
106106
}
107107

108108
// Helper function for testing (extract logic from isDynamicToolsFeatureEnabled)
109109
func isDynamicToolsFeatureEnabledFromConfig(configFile *configfile.ConfigFile) bool {
110110
if configFile == nil || configFile.Features == nil {
111-
return false // Default disabled when no config exists
111+
return true // Default enabled when no config exists
112112
}
113113
value, exists := configFile.Features["dynamic-tools"]
114114
if !exists {
115-
return false // Default disabled when not in config
115+
return true // Default enabled when not in config
116116
}
117117
return value == "enabled"
118118
}

examples/cagent/agent.yaml

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,8 @@
11
version: v2
2-
32
agents:
43
root:
54
model: claude
6-
description: Root orchestrator agent that coordinates tasks and delegates to specialized sub-agents
5+
description: An agent to help you discover MCPs from a local catalog
76
instruction: |
87
You are a specialized agent with access to MCP (Model Context Protocol) server tools
98
running through the Docker MCP Gateway.
@@ -19,16 +18,12 @@ agents:
1918
3. Return clear, structured results to the parent agent
2019
4. Handle errors gracefully and suggest alternatives
2120
toolsets:
22-
- type: filesystem # Grants the agent filesystem access
23-
- type: todo # Enable the todo list tool
2421
- type: mcp
2522
command: docker
2623
args:
2724
- mcp
2825
- gateway
2926
- run
30-
- --log=/Users/slim/gateway.log
31-
3227
models:
3328
claude:
3429
provider: anthropic

0 commit comments

Comments
 (0)