|
| 1 | +# 🛠️ Function-to-Tool Converter |
| 2 | + |
| 3 | +Turn any well-typed Python function into a structured tool description — perfect for AI agents, function-calling models, and LLM-powered applications. |
| 4 | + |
| 5 | +This tool takes your function and extracts: |
| 6 | +- 🔍 Function name |
| 7 | +- 🧾 Docstring as description |
| 8 | +- 🧩 Parameters and types (with default values) |
| 9 | +- 📤 Return type |
| 10 | +- 🧠 Outputs a standardized tool summary for use with agents |
| 11 | + |
| 12 | +--- |
| 13 | + |
| 14 | +## 🌐 Live Demo |
| 15 | + |
| 16 | +> Paste your Python function and convert it instantly into a structured tool description. |
| 17 | +
|
| 18 | +🚀 [Try it live](https://t.co/x0UjMxqonb) |
| 19 | +--- |
| 20 | + |
| 21 | +## 🧠 Why This Matters |
| 22 | + |
| 23 | +Modern LLM agents (like those powered by OpenAI, LangChain, LlamaIndex, and more) require well-structured metadata about tools they can use. This app helps bridge that gap between raw Python and AI usability. |
| 24 | + |
| 25 | +It’s especially useful for: |
| 26 | +- Tool registration with OpenAI Function Calling or LangChain |
| 27 | +- Building self-documenting APIs |
| 28 | +- Teaching LLMs to understand your code dynamically |
| 29 | + |
| 30 | +--- |
| 31 | + |
| 32 | +## 📽️ Demo |
| 33 | + |
| 34 | +Here’s a quick walkthrough of what the tool can do: |
| 35 | + |
| 36 | +[]([https://vimeo.com/1075209461?share=copy](https://13aluminium.github.io/ToolScript/)) |
| 37 | + |
| 38 | +--- |
| 39 | + |
| 40 | +## ✨ Features |
| 41 | + |
| 42 | +- Paste a function with `@tool` decorator |
| 43 | +- Click "Convert" to extract a tool summary |
| 44 | +- Optional syntax highlighting |
| 45 | +- Built-in example functions |
| 46 | +- Copy-ready output for your AI agent |
| 47 | + |
| 48 | +--- |
| 49 | + |
| 50 | +## 📦 Example Input |
| 51 | + |
| 52 | +```python |
| 53 | +@tool |
| 54 | +def get_weather(city: str, units: str = "metric") -> dict: |
| 55 | + """Fetch the current weather for a given city using METAR data. |
| 56 | +
|
| 57 | + Units can be 'metric' or 'imperial'. |
| 58 | + """ |
| 59 | + ... |
0 commit comments