Skip to content

Invalid field detected by input validation returns a jsonrpc error instead of a result with isError:true #450

@iwyrkore

Description

@iwyrkore

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:

  1. Call any tool with an invalid argument.
  2. 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}}

Metadata

Metadata

Assignees

No one assigned

    Labels

    needs investigationstatus unclear, requires more work and discussion

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions