Commit 99916ed7 authored by Kostas Chartsias's avatar Kostas Chartsias
Browse files

README modification - how to register new MCP tools

parent 1013fe99
Loading
Loading
Loading
Loading
+4 −3
Original line number Diff line number Diff line
@@ -91,11 +91,12 @@ Open-WebUI 0.6.34 - Python 3.11.x
To add a new tool:
1. Define Pydantic models for request, response data schema validation.
2. Define the tool in `tools/your_tool.py`.
3. Decorate it with the `@app.tool()` decorator in `app.py`:
3. Registers a tool in `app.py`:

   ```python
    from MCP_dummy_Camara.tools.your_tool import new_function
   app.tool()(new_function)
        
    app.tool()(new_function)  # registers it as a tool
   ```
4. Add corresponding models and JSON templates if needed.