Class DefaultMcpServer
java.lang.Object
io.jenkins.plugins.mcp.server.extensions.DefaultMcpServer
- All Implemented Interfaces:
ExtensionPoint
,McpServerExtension
-
Nested Class Summary
Nested 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, wait
Methods inherited from interface io.jenkins.plugins.mcp.server.McpServerExtension
getSyncPrompts, getSyncResources, getSyncTools
-
Constructor Details
-
DefaultMcpServer
public DefaultMcpServer()
-
-
Method Details
-
getBuild
@Tool(description="Get a specific build or the last build of a Jenkins job") public Run getBuild(@ToolParam(description="Job full nam of the Jenkins job (e.g., \'folder/job-name\')") String jobFullName, @Nullable @ToolParam(description="Build number (optional, if not provided, returns the last build)",required=false) String buildNumber) -
getJob
@Tool(description="Get a Jenkins job by its full path") public Job getJob(@ToolParam(description="Job full name of the Jenkins job (e.g., \'folder/job-name\')") String jobFullName) -
triggerBuild
@Tool(description="Trigger a build for a Jenkins job") public boolean triggerBuild(@ToolParam(description="Full path of the Jenkins job (e.g., \'folder/job-name\')") String jobFullName) -
getJobs
@Tool(description="Get a paginated list of Jenkins jobs, sorted by name. Returns up to \'limit\' jobs starting from the \'skip\' index. If no jobs are available in the requested range, returns an empty list.") public List<Job> getJobs(@ToolParam(description="The full path of the Jenkins folder (e.g., \'folder\'), if not specified, it returns the items under root",required=false) String parentFllName, @ToolParam(description="The 0 based started index, if not specified, then start from the first (0)",required=false) Integer skip, @ToolParam(description="The maximum number of items to return. If not specified, returns 10 items. Cannot exceed 10 items.",required=false) Integer limit)
-