Tool selection without arbitrary execution
Turn a request into an allowed read operation. Both the tool name and its argument must belong to a predefined list.
What the model decides. What code checks.
- One request identifies the allowed action, exact order ID, and whether the user wants to change data.
- Code checks both confidence thresholds, the known ID list, and the absence of an order-change request.
- The only allowed tool reads a fictional local dictionary. No URLs, arbitrary code, or external actions are executed.
Read. Run. Replay.
Unpack the archive and open its directory in a terminal. The first step needs neither a key nor a network connection.
python3 runner.py tool-routingFor a real run, set SHVYDKO_API_KEY in your computer or server environment. Do not put the key in your browser or source code. Current account quotas and pricing apply.
python3 runner.py tool-routing --live --output tool-routing-run.jsonThe report contains requests, actual responses, elapsed times, and known usage. The file is created with private permissions and never overwrites an existing file. Network failures are not automatically retried: check Usage before another call.
python3 runner.py tool-routing --replay tool-routing-run.jsonReplay checks that the recipe, inputs, and requests match. A local file is editable, so it is not signed proof of where responses came from. If you replace the inputs with your own data, the report will contain those data too: keep it private.
An open contract, with every step visible.
The plan below was generated by the same runner from the bundled fixtures. It contains requests and author expectations, not model results.
{
"mode": "offline_plan",
"model_calls": 0,
"recipe": "tool-routing",
"author_expectation": {
"tool": "lookup_order",
"order_id": "DEMO-104"
},
"notice": "Requests only, no model answers. Hierarchy includes conditional branches; repetition requests are templates.",
"requests": [
{
"state": {
"message": "Please show the delivery status of order DEMO-104. Do not change it.",
"known_orders": [
"DEMO-104",
"DEMO-205"
]
},
"questions": {
"tool": {
"type": "choice",
"instructions": "Which read-only action is requested?",
"criteria": {
"lookup_order": "Read delivery status of one existing order",
"none": "Not a supported read-only lookup"
}
},
"order": {
"type": "choice",
"instructions": "Which exact known order is requested?",
"criteria": {
"DEMO-104": "DEMO-104",
"DEMO-205": "DEMO-205",
"unknown": "No unambiguous known order"
}
},
"changes": {
"type": "noul",
"instructions": "The request asks to change, cancel, refund or otherwise mutate an order."
}
}
}
]
}