Make an agent's next action explicit: choose a named tool only when its name appears in the goal, otherwise stop safely.
Required APIdef choose_tool(goal, tools):
return tool_name_or_stopBehaviorThink through the mechanism first if you want the extra reasoning step. It never blocks the editor.
choose_tool('please read the file', ['read', 'write'])an agent action must come from the tool schema
choose_tool('say hello', ['read', 'write'])uncertain plans should terminate rather than invent a tool
2 hidden edge tests run after the visible contract passes.
Run Tests to see the contract verdicts here.