Class WarningsMcpServerExtension

java.lang.Object
io.jenkins.plugins.analysis.core.mcp.WarningsMcpServerExtension
All Implemented Interfaces:
ExtensionPoint, io.jenkins.plugins.mcp.server.McpServerExtension

@OptionalExtension(requirePlugins="mcp-server") public class WarningsMcpServerExtension extends Object implements io.jenkins.plugins.mcp.server.McpServerExtension
An extension of the for MCP server exposing AnalysisResult associated with a given build as a JSON object.
  • Constructor Details

    • WarningsMcpServerExtension

      public WarningsMcpServerExtension()
  • Method Details

    • getWarnings

      @Tool(description="Retrieves the warnings from static analysis tools associated with a Jenkins build", annotations=) public Map<String,Object> getWarnings(@ToolParam(description="Job full name of the Jenkins job (e.g., \'folder/job-name\')") String jobFullName, @ToolParam(description="Build number (optional, if not provided, returns the test results for last build)",required=false) Integer buildNumber, @ToolParam(description="ID of the check action (optional, if not provided, all warnings are returned)",required=false) String checkId)
      Retrieves the warnings from static analysis tools.
      Parameters:
      jobFullName - full job name
      buildNumber - build number
      checkId - check action ID
      Returns:
      map in the form {checkId1:[{category:"CAT", message:"MSG", type:"TYPE", ...}]}