Reflective工具
Builds a BaseTool from a Tool-annotated Java method, on the JVM only, for javac-only modules; prefer the KSP @Tool path whenever the code is built with the Kotlin compiler, which processes .java sources too. It reads the same Tool/Param annotations, including Tool.requireConfirmation, relying on Param.name/Param.required because Java retains neither parameter names nor nullability; every parameter needs Param except one Context or ToolContext and one experimental Publisher<LiveRequest> (or Publisher<? extends LiveRequest>), which carries ToolContext.liveRequests. Like a KSP tool, the method runs in the calling coroutine and keeps its context (such as MDC), so run blocking methods on a dispatcher meant for blocking work, such as PublisherRunner.runAsync's default; a returned Reactive Streams Publisher acts as a returned Flow does (see BaseTool.run).