Class McpToolSpecifications

java.lang.Object
com.xebialabs.xlrelease.mcp.server.McpToolSpecifications

public final class McpToolSpecifications extends Object
Turns the McpTool-annotated methods on the McpToolset beans into MCP SDK McpServerFeatures.SyncToolSpecifications: discover the tools, derive a JSON input schema from each method's parameters (via the victools generator, recursing into object types so clients can render their fields), bind arguments, invoke, and convert the result. Results carry both a JSON text block and structuredContent (see toCallToolResult(java.lang.reflect.Method, java.lang.Object)).
  • Constructor Details

    • McpToolSpecifications

      public McpToolSpecifications(com.fasterxml.jackson.databind.json.JsonMapper jsonMapper)
      Registrar that never gates on read-only mode — for tests and contexts without the feature setting.
    • McpToolSpecifications

      public McpToolSpecifications(com.fasterxml.jackson.databind.json.JsonMapper jsonMapper, BooleanSupplier readOnlyModeSupplier)
  • Method Details

    • from

      public List<io.modelcontextprotocol.server.McpServerFeatures.SyncToolSpecification> from(List<? extends McpToolset> toolsets)