Execution of clientTools
Currently, when defining clientTools in mastra/client-js, execute is completely ignored.
That is, even if llm requests tool-call, execute is never called in client-js.
You should call execute in the client-js environment and feed the tool-result back to llm.
In ai-sdk, addToolResult is used on the front end. On the backend, appendMessageAnnotation can be used to feed back the status of any tool call.
https://ai-sdk.dev/docs/reference/ai-sdk-ui/use-chat#add-tool-result
That is, even if llm requests tool-call, execute is never called in client-js.
You should call execute in the client-js environment and feed the tool-result back to llm.
In ai-sdk, addToolResult is used on the front end. On the backend, appendMessageAnnotation can be used to feed back the status of any tool call.
https://ai-sdk.dev/docs/reference/ai-sdk-ui/use-chat#add-tool-result