ToolExecuteCallback Delegate

The function that executes a tool (https://webmachinelearning.github.io/webmcp/#callbackdef-toolexecutecallback): it receives the input arguments (an object created from the JSON arguments of the caller) and returns the result, which is serialized to JSON for the caller.

public delegate Task<object?> ToolExecuteCallback(object inputObject, ToolExecuteCallbackOptions options)

Parameters

inputObject object
The input arguments: a JavaScript object of the realm of the document of the tool.
options ToolExecuteCallbackOptions
The options of the execution.

See also