Strict Tool Schemas
All tool definitions in GitAuto use "strict": true in their JSON schemas with "additionalProperties": false. This forces the model to produce valid JSON matching the exact schema, with no extra fields or wrong types.
Why This Exists
Without strict schemas, the model can hallucinate extra fields, use wrong types, or pass malformed arguments to tools. For example, it might add a confidence field that does not exist in the schema, or pass a number where a string is expected. Strict mode catches these errors at the API level before any tool execution occurs.
Why Models Hallucinate Tool Parameters
Models generate tool call parameters by token prediction, not by schema validation. If a tool expects file_path, the model might output filepath, path, or file_name - all semantically equivalent but technically wrong. Models also add extra fields or use wrong types (string instead of integer) because training data contains diverse JSON structures with varying field names for the same concept. Without strict validation, these small deviations silently break tool execution.
How It Works
Every tool definition sent to the LLM API includes "strict": true at the top level and "additionalProperties": false in the JSON schema. The API validates the model's tool call output against the schema before returning it. If the output does not match - wrong types, extra fields, missing required fields - the API returns a validation error instead of the malformed tool call. GitAuto's tool argument correction feature can then fix minor issues and retry.
Related Features
- Tool Argument Correction - fixes minor argument issues that strict schemas catch
- Temperature Zero - reduces randomness that could lead to schema violations
Need Help?
Have questions or suggestions? We're here to help you get the most out of GitAuto.
Contact us with your questions or feedback!