@@ -35,7 +35,7 @@ type getDeploymentsForCVEInput struct {
3535 FilterClusterID string `json:"filterClusterId,omitempty"`
3636 FilterNamespace string `json:"filterNamespace,omitempty"`
3737 FilterPlatform filterPlatformType `json:"filterPlatform,omitempty"`
38- IncludeAffectedImages bool `json:"includeAffectedImages ,omitempty"`
38+ IncludeDetectedImages bool `json:"includeDetectedImages ,omitempty"`
3939 Cursor string `json:"cursor,omitempty"`
4040}
4141
@@ -55,7 +55,7 @@ type DeploymentResult struct {
5555 Namespace string `json:"namespace"`
5656 ClusterID string `json:"clusterId"`
5757 ClusterName string `json:"clusterName"`
58- AffectedImages []string `json:"affectedImages ,omitempty"`
58+ DetectedImages []string `json:"detectedImages ,omitempty"`
5959 ImageFetchError string `json:"imageFetchError,omitempty"`
6060}
6161
@@ -93,10 +93,16 @@ func (t *getDeploymentsForCVETool) GetName() string {
9393func (t * getDeploymentsForCVETool ) GetTool () * mcp.Tool {
9494 return & mcp.Tool {
9595 Name : t .name ,
96- Description : "Get list of deployments where a specified CVE is detected in application" +
97- " or platform container images. Checks user workloads for vulnerabilities." +
98- " For complete CVE analysis, also check get_clusters_with_orchestrator_cve (Kubernetes components)" +
99- " and get_nodes_for_cve (node OS)." ,
96+ Description : "Get list of deployments where a specified CVE" +
97+ " is detected in application or platform container images." +
98+ " USAGE PATTERNS:" +
99+ " 1) When user asks 'Is CVE-X detected in my clusters?' (plural, general question):" +
100+ " Call ALL THREE CVE tools (get_clusters_with_orchestrator_cve, get_deployments_for_cve, get_nodes_for_cve)" +
101+ " for comprehensive coverage." +
102+ " 2) When user asks specifically about 'deployments', 'workloads', 'applications'," +
103+ " or 'containers': Use ONLY this tool." +
104+ " 3) For single cluster queries (e.g., 'in cluster X'): First call list_clusters to get cluster ID," +
105+ " then call ONLY this tool with filterClusterId." ,
100106 InputSchema : getDeploymentsForCVEInputSchema (),
101107 }
102108}
@@ -127,10 +133,10 @@ func getDeploymentsForCVEInputSchema() *jsonschema.Schema {
127133 filterPlatformPlatform ,
128134 }
129135
130- schema .Properties ["includeAffectedImages " ].Description =
131- "Whether to include affected image names for each deployment.\n " +
136+ schema .Properties ["includeDetectedImages " ].Description =
137+ "Whether to include detected image names for each deployment.\n " +
132138 "WARNING: This may significantly increase response time."
133- schema .Properties ["includeAffectedImages " ].Default = toolsets .MustJSONMarshal (false )
139+ schema .Properties ["includeDetectedImages " ].Default = toolsets .MustJSONMarshal (false )
134140
135141 schema .Properties ["cursor" ].Description = "Cursor for next page provided by server"
136142
@@ -224,7 +230,7 @@ func (e *deploymentEnricher) enrich(
224230 return
225231 }
226232
227- deployment .AffectedImages = images
233+ deployment .DetectedImages = images
228234 })
229235}
230236
@@ -309,7 +315,7 @@ func (t *getDeploymentsForCVETool) handle(
309315 }
310316 }
311317
312- if input .IncludeAffectedImages {
318+ if input .IncludeDetectedImages {
313319 imageClient := v1 .NewImageServiceClient (conn )
314320 enricher := newDeploymentEnricher (imageClient , input .CVEName , defaultMaxFetchImageConcurrency )
315321
0 commit comments