[PATCH 12/23] rteval MCP: Fix glob patterns to find rteval result files
John Kacur <[email protected]>
| Newsgroups | org.kernel.vger.linux-rt-users |
|---|---|
| Message-ID | <[email protected]> |
Three MCP tools were using "*.xml" pattern which doesn't find rteval result files in their subdirectories. Changed to "rteval-*/summary.xml" to correctly locate rteval results. Fixed tools: - filter_results: Now finds rteval result files for kernel/date filtering - find_best_worst: Now finds rteval result files for best/worst analysis - compare_to_baseline: Now finds rteval result files for regression detection The batch_analysis tool already had a configurable pattern parameter and was working correctly. This bug was discovered by the new integration test which validates that all MCP tools work end-to-end through the MCP interface. Assisted-by: Claude:claude-sonnet-4-5 Signed-off-by: John Kacur <[email protected]> --- mcp-server/server.py | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/mcp-server/server.py b/mcp-server/server.py index 48474df56fab..dc68b3a3ad47 100755 --- a/mcp-server/server.py +++ b/mcp-server/server.py @@ -1149,12 +1149,12 @@ async def call_tool(name: str, arguments: Any) -> list[TextContent]: text=f"Error: Directory '{directory}' does not exist" )] - # Find all XML files - files = list(path.glob("*.xml")) + # Find rteval result files + files = list(path.glob("rteval-*/summary.xml")) if not files: return [TextContent( type="text", - text=f"No XML files found in '{directory}'" + text=f"No rteval result files found in '{directory}'" )] # Parse and filter @@ -1262,12 +1262,12 @@ async def call_tool(name: str, arguments: Any) -> list[TextContent]: text=f"Error: Directory '{directory}' does not exist" )] - # Find all XML files - files = list(path.glob("*.xml")) + # Find rteval result files + files = list(path.glob("rteval-*/summary.xml")) if not files: return [TextContent( type="text", - text=f"No XML files found in '{directory}'" + text=f"No rteval result files found in '{directory}'" )] # Parse and collect metrics @@ -1380,11 +1380,11 @@ async def call_tool(name: str, arguments: Any) -> list[TextContent]: text=f"Error: Directory '{directory}' does not exist" )] - files = list(path.glob("*.xml")) + files = list(path.glob("rteval-*/summary.xml")) if not files: return [TextContent( type="text", - text=f"No XML files found in '{directory}'" + text=f"No rteval result files found in '{directory}'" )] # Build comparison report -- 2.55.0