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)).
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final String
    Namespaced _meta key carrying the UI presentation hints.
  • Constructor Summary

    Constructors
    Constructor
    Description
    McpToolSpecifications(tools.jackson.databind.json.JsonMapper jsonMapper)
    Registrar that never gates on read-only mode — for tests and contexts without the feature setting.
    McpToolSpecifications(tools.jackson.databind.json.JsonMapper jsonMapper, BooleanSupplier readOnlyModeSupplier)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    List<io.modelcontextprotocol.server.McpServerFeatures.SyncToolSpecification>
    from(List<? extends com.xebialabs.xlrelease.mcp.api.McpToolset> toolsets)
     

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

    • PRESENTATION_META_KEY

      public static final String PRESENTATION_META_KEY
      Namespaced _meta key carrying the UI presentation hints.
      See Also:
  • Constructor Details

    • McpToolSpecifications

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

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

    • from

      public List<io.modelcontextprotocol.server.McpServerFeatures.SyncToolSpecification> from(List<? extends com.xebialabs.xlrelease.mcp.api.McpToolset> toolsets)