genkit icon indicating copy to clipboard operation
genkit copied to clipboard

feat(go): add DefineToolWithInputSchema to support custom JSON schemas

Open MyeongKim opened this issue 7 months ago • 1 comments

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)

MyeongKim avatar May 15 '25 03:05 MyeongKim

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.

apascal07 avatar May 15 '25 17:05 apascal07