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
Consolidate RouteCoverageService tools to fix Claude API 64-char limit
- Replace 6 methods with single get_route_coverage method
- Reduce tool name from 72 chars to 34 chars (mcp__contrast__get_route_coverage)
- Add 14 unit tests and 5 integration tests (all passing)
- Maintain backward compatibility for all 6 original use cases
- Fix integration test to handle UnauthorizedException properly
Fixes AIML-224
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
@@ -48,150 +43,92 @@ public class RouteCoverageService {
48
43
@Value("${http.proxy.port:${http_proxy_port:}}")
49
44
privateStringhttpProxyPort;
50
45
51
-
52
-
53
-
@Tool(name = "get_application_route_coverage", description = "takes a application name and return the route coverage data for that application. " +
54
-
"If a route/endpoint is DISCOVERED, it means it has been found by Assess but that route has had no inbound http requests. If it is EXERCISED, it means it has had atleast one inbound http request to that route/endpoint.")
logger.info("Retrieving route coverage for application ID: {}", appId);
74
+
75
+
// Validate parameters
76
+
if (sessionMetadataName != null && sessionMetadataValue == null) {
77
+
StringerrorMsg = "sessionMetadataValue is required when sessionMetadataName is provided";
78
+
logger.error(errorMsg);
79
+
thrownewIllegalArgumentException(errorMsg);
77
80
}
78
81
79
-
logger.info("Successfully retrieved route coverage for application: {}", app_name);
80
-
returnresponse;
81
-
}
82
-
83
-
@Tool(name = "get_application_route_coverage_by_app_id", description = "takes a application id and return the route coverage data for that application. " +
84
-
"If a route/endpoint is DISCOVERED, it means it has been found by Assess but that route has had no inbound http requests. If it is EXERCISED, it means it has had atleast one inbound http request to that route/endpoint.")
logger.info("Successfully retrieved route coverage for application ID: {}", app_id);
102
-
returnresponse;
103
-
}
104
-
105
-
@Tool(name = "get_application_route_coverage_by_app_name_and_session_metadata", description = "takes a application name and return the route coverage data for that application for the specified session metadata name and value. " +
106
-
"If a route/endpoint is DISCOVERED, it means it has been found by Assess but that route has had no inbound http requests. If it is EXERCISED, it means it has had at least one inbound http request to that route/endpoint.")
@Tool(name = "get_application_route_coverage_by_app_id_and_session_metadata", description = "takes a application id and return the route coverage data for that application for the specified session metadata name and value. " +
121
-
"If a route/endpoint is DISCOVERED, it means it has been found by Assess but that route has had no inbound http requests. If it is EXERCISED, it means it has had at least one inbound http request to that route/endpoint.")
logger.info("Successfully retrieved route coverage for application ID: {}", app_id);
143
-
returnresponse;
144
-
}
145
85
146
-
@Tool(name = "get_application_route_coverage_by_app_name_latest_session", description = "takes a application name and return the route coverage data for that application from the latest session. " +
147
-
"If a route/endpoint is DISCOVERED, it means it has been found by Assess but that route has had no inbound http requests. If it is EXERCISED, it means it has had atleast one inbound http request to that route/endpoint.")
@Tool(name = "get_application_route_coverage_by_app_id_latest_session", description = "takes a application id and return the route coverage data for that application from the latest session. " +
161
-
"If a route/endpoint is DISCOVERED, it means it has been found by Assess but that route has had no inbound http requests. If it is EXERCISED, it means it has had atleast one inbound http request to that route/endpoint.")
0 commit comments