You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: mcpserver/tools.go
+37Lines changed: 37 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -131,6 +131,7 @@ func init() {
131
131
EnvironmentOpenTool,
132
132
EnvironmentCreateTool,
133
133
EnvironmentUpdateMetadataTool,
134
+
EnvironmentEnableTrackingTool,
134
135
EnvironmentConfigTool,
135
136
136
137
EnvironmentRunCmdTool,
@@ -312,6 +313,42 @@ var EnvironmentUpdateMetadataTool = &Tool{
312
313
},
313
314
}
314
315
316
+
varEnvironmentEnableTrackingTool=&Tool{
317
+
Definition: newEnvironmentTool(
318
+
"environment_enable_tracking",
319
+
"Enable branch tracking for an environment. When enabled, environment changes will be automatically synced to the user's working tree when on the tracked branch. CRITICAL: This is an opt-in feature that can only be enabled by explicit user request.",
returnnil, fmt.Errorf("unable to update the environment: %w", err)
342
+
}
343
+
344
+
out, err:=marshalEnvironment(env)
345
+
iferr!=nil {
346
+
returnnil, fmt.Errorf("failed to marshal environment: %w", err)
347
+
}
348
+
returnmcp.NewToolResultText(fmt.Sprintf("Branch tracking enabled for branch '%s'. Environment changes will now be synced to the working tree when on this branch.\n%s", currentBranch, out)), nil
0 commit comments