Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

That's what I thought when starting and it functions so poorly that I think they should remove it from their docs. You can enforce a schema by creating a tool definition with json in the exact shape you want the output, then set "tool_choice" to "any". They have a picture that helps.

https://docs.claude.com/en/docs/agents-and-tools/tool-use/im...

Unfortunately it doesn't support the full JSON schema. You can't union or do other things you would expect. It's manageable since you can just create another tool for it to chose from that fits another case.



Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: