Skip to content

Tools

alloy.tool

tool

tool(fn=None)

Decorator to mark a Python function as an Alloy tool.

The decorated callable still runs locally in Python, but carries metadata and contracts to teach the AI how to use it.