Describe the bug
When you call a tool with an argument field that's not in the input schema, it returns a jsonrpc "error" message instead of a result with isError:true so the client LLM can see it.
To Reproduce
Steps to reproduce the behavior:
- Call any tool with an invalid argument.
- Check the result error.
It looks something like this:
data: {"jsonrpc":"2.0","id":2,"error":{"code":0,"message":"unmarshaling: json: unknown field \"foobar\""}}
Expected behavior
I expected to see an error something like this:
{"jsonrpc":"2.0","id":2,"result":{"content":[{"type":"text","text":"error unmarshaling: json: unknown field \"foobar\")"}],"isError":true}}