Skip to content

Call schema on inputSchema validation failure #1160

@clemmy

Description

@clemmy

Is your feature request related to a problem? Please describe.

Currently, it's pretty hard to tie in custom logic to input schema validation. If a tool is invoked with the wrong input schema, I would like to be able to add logging logic to track this. This would be helpful for observability of my tool-calls and to better tune the tool names / params / descriptions to help with LLM usage.

Describe the solution you'd like

It would be ideal if we can specify a callback to call on input schema validation failures.

Describe alternatives you've considered

One option is to not pass in inputSchema and just completely handle input schema validation in the handler. This seems a bit unideal when the SDK already gives a more official inputSchema arg.

Another option is by intercepting the response downstream and "detecting" it's an inputSchema validation error. This also seems a bit hacky to do and at the wrong layer.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementRequest for a new feature that's not currently supported

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions