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