Loading src/main/java/org/etsi/osl/mcp/server/ProductCatalogTools.java +1 −1 Original line number Diff line number Diff line Loading @@ -177,7 +177,7 @@ public class ProductCatalogTools { // Filter and get result as JSON string try { String[] tokens = {"id", "name", "description", "isBundle", "@type", "configurable", "valueType", "isBundle" }; String[] tokens = {"productOfferingId", "productName", "productDescription", "isBundle", "@type", "isBundle", "categoryName" }; JsonNode filtered = JsonMassage.filterJsonByTokens( spec, tokens); return filtered; } catch (Exception e) { Loading src/main/java/org/etsi/osl/mcp/server/ServiceCatalogTools.java +10 −1 Original line number Diff line number Diff line Loading @@ -31,10 +31,12 @@ import org.etsi.osl.tmf.so641.model.ServiceOrderStateType; import org.etsi.osl.tmf.so641.model.ServiceRestriction; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.springframework.ai.chat.model.ToolContext; import org.springframework.ai.tool.annotation.Tool; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Value; import org.springframework.core.ParameterizedTypeReference; //import org.springframework.security.core.context.SecurityContextHolder; import org.springframework.web.client.RestClient; import jakarta.validation.Valid; Loading @@ -55,6 +57,13 @@ public class ServiceCatalogTools { ServiceCatalogQClient aCatalogClient; // @Tool(description="Get your name") // public String getYourName(ToolContext context) { // logger.info("ToolContext: {}", McpRequestHolder.get(context).headers()); // return SecurityContextHolder.getContext().getAuthentication().getName(); // } @Tool(description = "Get a list of all published OSL OpenSlice service catalogs." + "Each catalog contains service categories, that we can search individually to get the details and contents of each category.") public JsonNode getOSLServiceCatalogs() { Loading Loading @@ -191,7 +200,7 @@ public class ServiceCatalogTools { // Filter and get result as JSON string try { String[] tokens = {"id", "name", "description", "@type", "configurable", "valueType", "isBundle" }; String[] tokens = {"serviceSpecificationId", "serviceName", "serviceDescription", "@type", "isBundle", "categoryName" }; JsonNode filtered = JsonMassage.filterJsonByTokens( spec, tokens); return filtered; } catch (Exception e) { Loading Loading
src/main/java/org/etsi/osl/mcp/server/ProductCatalogTools.java +1 −1 Original line number Diff line number Diff line Loading @@ -177,7 +177,7 @@ public class ProductCatalogTools { // Filter and get result as JSON string try { String[] tokens = {"id", "name", "description", "isBundle", "@type", "configurable", "valueType", "isBundle" }; String[] tokens = {"productOfferingId", "productName", "productDescription", "isBundle", "@type", "isBundle", "categoryName" }; JsonNode filtered = JsonMassage.filterJsonByTokens( spec, tokens); return filtered; } catch (Exception e) { Loading
src/main/java/org/etsi/osl/mcp/server/ServiceCatalogTools.java +10 −1 Original line number Diff line number Diff line Loading @@ -31,10 +31,12 @@ import org.etsi.osl.tmf.so641.model.ServiceOrderStateType; import org.etsi.osl.tmf.so641.model.ServiceRestriction; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.springframework.ai.chat.model.ToolContext; import org.springframework.ai.tool.annotation.Tool; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Value; import org.springframework.core.ParameterizedTypeReference; //import org.springframework.security.core.context.SecurityContextHolder; import org.springframework.web.client.RestClient; import jakarta.validation.Valid; Loading @@ -55,6 +57,13 @@ public class ServiceCatalogTools { ServiceCatalogQClient aCatalogClient; // @Tool(description="Get your name") // public String getYourName(ToolContext context) { // logger.info("ToolContext: {}", McpRequestHolder.get(context).headers()); // return SecurityContextHolder.getContext().getAuthentication().getName(); // } @Tool(description = "Get a list of all published OSL OpenSlice service catalogs." + "Each catalog contains service categories, that we can search individually to get the details and contents of each category.") public JsonNode getOSLServiceCatalogs() { Loading Loading @@ -191,7 +200,7 @@ public class ServiceCatalogTools { // Filter and get result as JSON string try { String[] tokens = {"id", "name", "description", "@type", "configurable", "valueType", "isBundle" }; String[] tokens = {"serviceSpecificationId", "serviceName", "serviceDescription", "@type", "isBundle", "categoryName" }; JsonNode filtered = JsonMassage.filterJsonByTokens( spec, tokens); return filtered; } catch (Exception e) { Loading