]> apps.delaporte.us Git - matrix-shop-bot.git/blob - skill.py
WIP skill with llama-ui
[matrix-shop-bot.git] / skill.py
1 from fastmcp import FastMCP
2 from matrix_shop_bot.db import Data
3 import os
4
5 MY_IP=os.environ.get('MY_IP')
6 mcp = FastMCP("Shop Bot")
7
8 @mcp.tool
9 def add_item(name: str) -> 'list[str]':
10 return Data().add_item(name)
11
12 #@mcp.tool
13 #def buy(items:str) -> 'list[str]':
14 # return Data().purchase_items(items)
15 #
16 #@mcp.tool
17 #def list_bought(store:str) -> 'list[str]':
18 # return Data().list_purchases(store)
19 #
20 #@mcp.tool
21 #def clear(store_name: str, clear_all:bool=False) -> 'list[str]':
22 # return Data().clear_list(store_name, clear_all)
23 #
24 #
25 #@mcp.tool
26 #def shop_at(store_name:str) -> 'list[str]':
27 # '''Select store to shop at'''
28 # return Data().get_shopping_list(store_name)
29 #
30 #
31 #@mcp.tool
32 #def list() -> 'list[str]':
33 # '''Use previous store'''
34 # return Data().get_last_shopping_list()
35 #
36 #
37 #@mcp.tool
38 #def list_stores() -> 'list[str]':
39 # return Data().get_stores()
40 #
41 #
42 #@mcp.tool
43 #def list_purchases(store: str) -> 'list[str]':
44 # return Data().list_purchases(store)
45
46 if __name__ == "__main__":
47 mcp.run(transport="http", host=MY_IP, port=9000)