Interface ToolFn
- Functional Interface:
- This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.
Synchronous tool function. Unlike
BiFunction, apply(dev.tachyonmcp.api.runtime.InteractionContext, dev.tachyonmcp.api.server.features.tools.ToolRequest) may
throw checked exceptions — the dispatcher already logs them and maps them to a JSON-RPC error,
exactly as it does for ResourceFn and PromptFn.
Receives the full ToolRequest — call ToolRequest.arguments() for parsed
Args, or read ToolRequest.progressToken()
or ToolRequest.task() directly when needed.
- Author:
- Konstantin Pavlov
-
Method Summary
-
Method Details
-
apply
- Throws:
Exception
-