minor fixes
Signed-off-by: Christian Tzolov <christian.tzolov@broadcom.com>
This commit is contained in:
@@ -23,6 +23,7 @@ import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
|
||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
|
||||
import org.springframework.ai.tool.annotation.Tool;
|
||||
import org.springframework.ai.tool.annotation.ToolParam;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.web.client.RestClient;
|
||||
import org.springframework.web.client.RestClientException;
|
||||
@@ -120,7 +121,7 @@ public class WeatherService {
|
||||
* @throws RestClientException if the request fails
|
||||
*/
|
||||
@Tool(description = "Get weather alerts for a US state. Input is Two-letter US state code (e.g. CA, NY)")
|
||||
public String getAlerts(String state) {
|
||||
public String getAlerts(@ToolParam( description = "Two-letter US state code (e.g. CA, NY") String state) {
|
||||
Alert alert = restClient.get().uri("/alerts/active/area/{state}", state).retrieve().body(Alert.class);
|
||||
|
||||
return alert.features()
|
||||
|
||||
@@ -5,8 +5,6 @@ spring.main.web-application-type=none
|
||||
spring.main.banner-mode=off
|
||||
logging.pattern.console=
|
||||
|
||||
spring.ai.mcp.server.enabled=true
|
||||
|
||||
spring.ai.mcp.server.name=my-weather-server
|
||||
spring.ai.mcp.server.version=0.0.1
|
||||
|
||||
|
||||
Reference in New Issue
Block a user