You should do the new HF TGI server, it has both grammar & tool support now. Works fabulously with Mistral Instruct & Mixtral Instruct.
Most of langchain is basically a specific prompt with exception handling for missing fields.
Grammars perfectly restrict LLM token output. They’re hard grammar rules.