Learn the core pattern behind tool use: detect intent, validate inputs, run a bounded tool, and return structured JSON.
- Deterministic routing to allowed tools.
- Basic input validation and error handling.
- Structured output for easy downstream use.
calculator: safe arithmetic evaluation (+ - * / ( )).date: returns current UTC date/time.word_count: counts words in provided text.
python3 run.py --query "what is (12 * 5) + 7"
python3 run.py --query "date"
python3 run.py --query "word count: AI systems need evals"python3 -m unittest discover -s tests -p "test_*.py"- Input:
sample_input/request.json - Output:
sample_output/response.json