genkit
genkit copied to clipboard
feat(go): add DefineToolWithInputSchema to support custom JSON schemas
Added a new function variant DefineToolWithInputSchema that allow defining tools with explicit JSON schema definitions instead of relying on struct reflection. This provides more flexible runtime input validation beyond Go struct reflection, which is ideal for tools requiring custom validation or adherence to external JSON Schema contracts.
Checklist (if applicable):
- [X] PR title is following https://www.conventionalcommits.org/en/v1.0.0/
- [X] Tested (manually, unit tested, etc.) - manually tested
- [ ] Docs updated (updated docs or a docs bug required)
Hi MJ, thank you for your contribution! The code looks good but let me consider how this may interact with other work we have in progress and I'll get back to you soon.