From efbf994b428f4b8c147b3751e898a7e85ca3c426 Mon Sep 17 00:00:00 2001 From: Edward Delaporte Date: Sun, 26 Jul 2026 18:47:33 -0500 Subject: [PATCH 1/1] WIP skill --- mcp.py | 45 --------------------------------------------- skill.py | 45 +++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 45 insertions(+), 45 deletions(-) delete mode 100644 mcp.py create mode 100644 skill.py diff --git a/mcp.py b/mcp.py deleted file mode 100644 index 50a2eff..0000000 --- a/mcp.py +++ /dev/null @@ -1,45 +0,0 @@ -from fastmcp import FastMCP -from matrix_shop_bot.db import Data - -mcp = FastMCP("Shop Bot") - -@mcp.tool -def add_item(name: str) -> list[str]: - return Data().add_item(name) - -@mcp.tool -def buy(items:str) -> list[str]: - return Data().purchase_items(items) - -@mcp.tool -def list_bought(store:str) -> list[str]: - return Data().list_purchases(store) - -@mcp.tool -def clear(store_name: str, clear_all:bool=False) -> list[str]: - return Data().clear_list(store_name, clear_all) - - -@mcp.tool -def shop_at(store_name:str) -> list[str]: - '''Select store to shop at''' - return Data().get_shopping_list(store_name) - - -@mcp.tool -def list() -> list[str]: - '''Use previous store''' - return Data().get_last_shopping_list() - - -@mcp.tool -def list_stores() -> list[str]: - return Data().get_stores() - - -@mcp.tool -def list_purchases(store: str) -> list[str]: - return Data().list_purchases(store) - -if __name__ == "__main__": - mcp.run() diff --git a/skill.py b/skill.py new file mode 100644 index 0000000..53bdf9e --- /dev/null +++ b/skill.py @@ -0,0 +1,45 @@ +from fastmcp import FastMCP +from matrix_shop_bot.db import Data + +mcp = FastMCP("Shop Bot") + +@mcp.tool +def add_item(name: str) -> 'list[str]': + return Data().add_item(name) + +#@mcp.tool +#def buy(items:str) -> 'list[str]': +# return Data().purchase_items(items) +# +#@mcp.tool +#def list_bought(store:str) -> 'list[str]': +# return Data().list_purchases(store) +# +#@mcp.tool +#def clear(store_name: str, clear_all:bool=False) -> 'list[str]': +# return Data().clear_list(store_name, clear_all) +# +# +#@mcp.tool +#def shop_at(store_name:str) -> 'list[str]': +# '''Select store to shop at''' +# return Data().get_shopping_list(store_name) +# +# +#@mcp.tool +#def list() -> 'list[str]': +# '''Use previous store''' +# return Data().get_last_shopping_list() +# +# +#@mcp.tool +#def list_stores() -> 'list[str]': +# return Data().get_stores() +# +# +#@mcp.tool +#def list_purchases(store: str) -> 'list[str]': +# return Data().list_purchases(store) + +if __name__ == "__main__": + mcp.run(transport="http", host="127.0.0.1", port=9000) -- 2.47.3