Problem
Several mutating MCP tools don't declare mcp.WithDestructiveHintAnnotation(true). Linear and Notion mutation tools do — so cautious MCP clients (Claude Desktop, Cursor) will prompt before Linear writes but silently execute kubectl delete pod or clanker run-command apply ....
Where
cmd/mcp_k8s.go:352 — k8s_delete_resource
cmd/mcp_k8s.go:379 — k8s_exec
cmd/mcp_k8s.go:434 — helm_install
cmd/mcp_k8s.go:523 — helm_uninstall
cmd/mcp_sentry.go:99 — sentry_resolve_issues
cmd/mcp.go:176 — clanker_run_command
Fix
Add mcp.WithDestructiveHintAnnotation(true) to every mutating tool. Add a unit test that fails when an unannotated tool name matches *_delete_*, *_uninstall*, *_exec*, *_resolve_*, or *_create_*:
func TestMutatingToolsHaveDestructiveHint(t *testing.T) {
suspect := regexp.MustCompile(`_(delete|uninstall|exec|resolve|create|apply|run)`)
for _, tool := range mcp.RegisteredTools() {
if suspect.MatchString(tool.Name) {
if !tool.Annotations.DestructiveHint {
t.Errorf("%s should declare DestructiveHint", tool.Name)
}
}
}
}
Acceptance criteria
- All 6 listed tools have the annotation
- The lint test passes against the current state
- New mutating tools added later will trip the test if they forget the annotation
Problem
Several mutating MCP tools don't declare
mcp.WithDestructiveHintAnnotation(true). Linear and Notion mutation tools do — so cautious MCP clients (Claude Desktop, Cursor) will prompt before Linear writes but silently executekubectl delete podorclanker run-command apply ....Where
cmd/mcp_k8s.go:352—k8s_delete_resourcecmd/mcp_k8s.go:379—k8s_execcmd/mcp_k8s.go:434—helm_installcmd/mcp_k8s.go:523—helm_uninstallcmd/mcp_sentry.go:99—sentry_resolve_issuescmd/mcp.go:176—clanker_run_commandFix
Add
mcp.WithDestructiveHintAnnotation(true)to every mutating tool. Add a unit test that fails when an unannotated tool name matches*_delete_*,*_uninstall*,*_exec*,*_resolve_*, or*_create_*:Acceptance criteria