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
Improve LLM tool parameter guidance and add E2E testing framework
Enhanced tool descriptions and parameter schemas to better guide LLMs on when to use optional parameters and which tools to select for different query types. Added mcp-testing-framework configuration with 8 test cases covering CVE queries and cluster operations, achieving 87.5% pass rate with GPT-5 models.
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
This directory contains end-to-end tests for the StackRox MCP server using the [mcp-testing-framework](https://github.com/L-Qun/mcp-testing-framework).
4
+
5
+
## Prerequisites
6
+
7
+
1.**OpenAI API Key**: Required for running the AI model tests
8
+
- Get your key from Bitwarden
9
+
10
+
2.**StackRox API Token**: Required for connecting to StackRox Central
11
+
- Generate from StackRox Central UI: Integrations > API Token > Generate Token
12
+
13
+
## Setup
14
+
15
+
### 1. Configure Environment Variables
16
+
17
+
Create a `.env` file with your credentials:
18
+
19
+
```bash
20
+
# OpenAI API key for running tests
21
+
OPENAI_API_KEY=sk-your-openai-key-here
22
+
23
+
# StackRox API Token for accessing Central
24
+
STACKROX_API_TOKEN=your-stackrox-api-token-here
25
+
```
26
+
27
+
### 2. Update Server Configuration (Optional)
28
+
29
+
Edit `mcp-testing-framework.yaml` if you need to change the StackRox Central URL:
30
+
31
+
32
+
## Running Tests
33
+
34
+
From the `e2e-tests` directory, run:
35
+
36
+
```bash
37
+
npx mcp-testing-framework@latest evaluate
38
+
```
39
+
40
+
This will:
41
+
- Spawn the StackRox MCP server in stdio mode
42
+
- Run test cases against the configured AI models (GPT-5 and GPT-5-mini)
43
+
- Generate a test report in the `mcp-reports/` directory
44
+
45
+
## Test Configuration
46
+
47
+
The `mcp-testing-framework.yaml` file controls the test behavior:
48
+
49
+
-**testRound**: Number of times each test runs (default: 3)
Description: "List all clusters managed by StackRox with their IDs, names, and types",
72
+
Description: "List all clusters managed by StackRox with their IDs, names, and types. Use this tool to get cluster information, or when you need to map a cluster name to its cluster ID for use in other tools.",
schema.Properties["offset"].Description="Starting index for pagination (0-based)"
87
+
schema.Properties["offset"].Description="Starting index for pagination (0-based). When using pagination, always provide both offset and limit together. Default: 0."
schema.Properties["limit"].Description="Maximum number of clusters to return (default: 0 - unlimited)"
91
+
schema.Properties["limit"].Description="Maximum number of clusters to return. Use 0 for unlimited (default). When using pagination, always provide both limit and offset together. Default: 0."
Description: "Get list of clusters affected by a specific CVE",
72
+
Description: "Get list of clusters affected by a specific CVE. Use this tool when asking about CVE impact on 'clusters' or general CVE impact questions. For deployment/workload-specific queries, use get_deployments_for_cve instead.",
Description: "Get list of deployments affected by a specific CVE",
96
+
Description: "Get detailed list of deployments (workloads/applications) affected by a specific CVE. Use this tool when the query specifically asks about 'workloads', 'deployments', 'applications', or needs deployment-level details. For general CVE impact or cluster-level queries, use get_clusters_for_cve instead.",
0 commit comments