feat(client): add client tool output schema validation and caching (#302)
- Add JSON schema validation for tool call results against output schemas - Implement automatic tool output schema caching during initialization - Add `enableCallToolSchemaCaching` configuration option to enable/disable schema caching - Add `JsonSchemaValidator` integration to McpClient builder APIs - Introduce post-initialization hook mechanism for performing operations after successful client initialization - Cache tool output schemas during `listTools` operations when caching is enabled - Validate tool results against cached schemas in `callTool` operations - Return error CallToolResult when validation fails - Add test coverage - Convert validateToolResult from Mono to synchronous method - Throw IllegalArgumentException on validation errors Signed-off-by:Christian Tzolov <christian.tzolov@broadcom.com> Co-authored-by:
Anurag Pant <pantanurag555@github> Co-authored-by:
Christian Tzolov <christian.tzolov@broadcom.com> Co-authored-by:
Daniel Garnier-Moiroux <git@garnier.wf> Co-authored-by:
Dariusz Jędrzejczyk <dariusz.jedrzejczyk@broadcom.com>
Loading
Please sign in to comment