call

abstract fun call(input: String): Tool.Result

Execute the tool with JSON input.

Return

Result to send back to LLM

Parameters

input

JSON string matching inputSchema


open fun call(input: String, context: ToolCallContext): Tool.Result

Execute the tool with JSON input and out-of-band context.

The default implementation simply delegates to call (String), discarding the context. Override this method to receive context explicitly (e.g., for auth tokens, tenant IDs, or correlation IDs).

DelegatingTool provides a default that propagates context through decorator chains, so most decorators do not need to override this.

Return

Result to send back to LLM

Parameters

input

JSON string matching inputSchema

context

out-of-band metadata (auth tokens, tenant IDs, etc.)