Build Tool-Calling Parsers in Rust with AI Agents NVIDIA Dynamo's frontend-crates project publishes a language-neutral Conformance Corpus of YAML fixtures that pair fixed model output with expected parser results, letting Rust parsers and Python references run identical cases for complete, malformed, truncated, multiple and interleaved tool calls, plus streaming boundaries and end-of-input behavior. The reusable Rust components behind NVIDIA Dynamo's tool-calling parsers consume token IDs or decoded text and separate reasoning, visible text and tool calls in order, with a protocol adapter converting those events into OpenAI-compatible batch JSON and streaming responses. The guidance distinguishes syntax errors, such as an unclosed get_weather call truncated mid-city, from semantic errors, such as a valid frame naming an unknown_tool absent from the request, and assigns validation of tool availability, authorization, schema and call policy to the serving layer rather than the parser. A tool call can arrive in pieces, an argument can be cut short, or model-specific markup can leak into the answer. A frontend parser turns that output, received as token IDs or decoded text, into visible text, reasoning, and tool calls an application can use. In this post, you’ll learn how tool-call parsing works and use an AI agent to build a parser for a new model. You’ll start with a weather request and a human-reviewed test set, using frontend-crates https://github.com/ai-dynamo/frontend-crates , the reusable Rust components behind NVIDIA Dynamo https://github.com/ai-dynamo/dynamo tool-calling parsers. Suppose you ask for the weather in Paris. The model may generate reasoning followed by a get weather call with a city argument. The frontend prepares and tokenizes the prompt, then an inference engine runs the LLM to generate tokens. The parser consumes token IDs or decoded text and separates reasoning, visible text, and tool calls in order. A protocol adapter turns those events into an OpenAI-compatible response, using the same parsing path for batch JSON and streaming updates. The tricky part is recognizing where each piece starts and ends. A call can be malformed or incomplete, a marker can appear inside an argument, or ordinary text can surround the call. The parser has to handle these boundaries without losing data, duplicating calls, or leaking model-specific markup. Returning to the weather request: the model might stop halfway through a city name or call a tool that wasn’t offered. Either can disrupt the agent’s next action. The following NVIDIA Nemotron examples show these two failures. Syntax error. The argument and tool-call frame never close, so no complete call can be parsed.