Class BuildLogsExtension
java.lang.Object
io.jenkins.plugins.mcp.server.extensions.BuildLogsExtension
- All Implemented Interfaces:
ExtensionPoint,McpServerExtension
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final recordstatic final recordstatic classNested classes/interfaces inherited from interface hudson.ExtensionPoint
ExtensionPoint.LegacyInstancesAreScopedToHudson -
Constructor Summary
Constructors -
Method Summary
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface io.jenkins.plugins.mcp.server.McpServerExtension
getSyncPrompts, getSyncResources, getSyncTools
-
Constructor Details
-
BuildLogsExtension
public BuildLogsExtension()
-
-
Method Details
-
getBuildLog
@Tool(description="Retrieves some log lines with pagination for a specific build or the last build of a Jenkins job, as well as a boolean value indicating whether there is more content to retrieve", annotations=) public BuildLogsExtension.BuildLogResponse getBuildLog(@ToolParam(description="Job full name of the Jenkins job (e.g., \'folder/job-name\')") String jobFullName, @ToolParam(description="The build number (optional, if not provided, returns the last build)",required=false) Integer buildNumber, @ToolParam(description="The skip (optional, if not provided, returns from the first line). Negative values function as \'from the end\', with -1 meaning starting with the last line",required=false) Long skip, @ToolParam(description="The number of lines to return (optional, if not provided, returns 100 lines), positive values return lines from the start, negative values return lines from the end",required=false) Integer limit) -
searchBuildLog
@Tool(description="Search for log lines matching a pattern in a specific build or the last build of a Jenkins job. Returns matching lines with their line numbers and context.", annotations=) public BuildLogsExtension.SearchLogResponse searchBuildLog(@ToolParam(description="Job full name of the Jenkins job (e.g., \'folder/job-name\')") String jobFullName, @ToolParam(description="The build number (optional, if not provided, searches the last build)",required=false) Integer buildNumber, @ToolParam(description="The search pattern (regex supported)") String pattern, @ToolParam(description="Whether to use regex pattern matching (default: false, uses simple string contains)",required=false) Boolean useRegex, @ToolParam(description="Whether the search should be case-insensitive (default: false)",required=false) Boolean ignoreCase, @ToolParam(description="Maximum number of matches to return (optional, default: 100, max: 1000)",required=false) Integer maxMatches, @ToolParam(description="Number of context lines to show before and after each match (default: 0)",required=false) Integer contextLines)
-