Class ToolResponse

java.lang.Object
dev.relism.flash.ext.mcp.ToolResponse

public final class ToolResponse extends Object
Result of a McpTool.call(ToolArguments) invocation.
  • Method Details

    • success

      public static ToolResponse success(Content... content)
      Successful tool result carrying one or more content blocks.
    • error

      public static ToolResponse error(String message)
      Tool-level failure — per the MCP specification this is still a normal JSON-RPC result (not a JSON-RPC error) with isError: true, so the model can see and react to it.