Class McpToolWrapper
java.lang.Object
io.jenkins.plugins.mcp.server.tool.McpToolWrapper
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionMcpToolWrapper(tools.jackson.databind.json.JsonMapper objectMapper, Object target, Method method) -
Method Summary
Modifier and TypeMethodDescriptionio.modelcontextprotocol.server.McpStatelessServerFeatures.SyncToolSpecificationio.modelcontextprotocol.server.McpServerFeatures.SyncToolSpecificationstatic io.modelcontextprotocol.spec.McpSchema.CallToolResultcallWithCapturedAuth(io.modelcontextprotocol.common.McpTransportContext context, Supplier<io.modelcontextprotocol.spec.McpSchema.CallToolResult> action) Runsactionas the caller stored on the MCP request, after requiringJenkins.READ.static StringResolves the tool name for aTool-annotated method without instantiating anMcpToolWrapper.
-
Field Details
-
DESCRIPTION
- See Also:
-
FULL_OBJECT_TREE
Passing this astreereturns the full exported object, bypassing anydefaultTree.- See Also:
-
-
Constructor Details
-
McpToolWrapper
-
-
Method Details
-
toolName
Resolves the tool name for aTool-annotated method without instantiating anMcpToolWrapper. Used during tool-override resolution to compare names before deciding which candidate to keep. -
callWithCapturedAuth
public static io.modelcontextprotocol.spec.McpSchema.CallToolResult callWithCapturedAuth(io.modelcontextprotocol.common.McpTransportContext context, Supplier<io.modelcontextprotocol.spec.McpSchema.CallToolResult> action) Runsactionas the caller stored on the MCP request, after requiringJenkins.READ.Annotation-backed tools do this in
call(McpTransportContext, McpSchema.CallToolRequest). ProgrammaticMcpServerExtension#getSyncTools()handlers must use this entry point as well: SSE message handling is offloaded to another thread, where the servlet security context is anonymous. AnAccessDeniedExceptionfrom the permission check becomes an error tool result, matching annotation-backed tools. -
asSyncToolSpecification
public io.modelcontextprotocol.server.McpServerFeatures.SyncToolSpecification asSyncToolSpecification() -
asStatelessSyncToolSpecification
public io.modelcontextprotocol.server.McpStatelessServerFeatures.SyncToolSpecification asStatelessSyncToolSpecification()
-