In this paper, we design a large-scale language model (LLM) agent for hyperparameter optimization of Warm-Start Particles Swarm Optimization with Crossover and Mutation (WS-PSO-CM) algorithm for unmanned aerial vehicle (UAV) trajectory and communication. Considering that the existing heuristic-based hyperparameter optimization methods have low level of automation and room for performance improvement, we propose an LLM agent that applies an iterative framework and Model Context Protocol (MCP). The LLM agent is configured through a profile that specifies the boundaries of hyperparameters, task objectives, termination conditions, conservative or aggressive strategies for hyperparameter optimization, and LLM configurations. The LLM agent repeatedly calls the WS-PSO-CM algorithm to perform exploration, and terminates the loop according to the termination condition and returns an optimized set of hyperparameters. Experimental results show that the minimum sum rate achieved using the hyperparameters generated by the LLM agent is much higher than that of the heuristic and random generation methods, demonstrating that the LLM agent with the knowledge of PSO and WS-PSO-CM algorithms is useful for finding high-performance hyperparameters.