]> us-delaporte.pagekite.me Git - matrix-shop-bot.git/blobdiff - skill.py
Fix
[matrix-shop-bot.git] / skill.py
index 428edc4f8a2bf0ba3bc806a291c270dd2c19f79d..3a1b1cbde80b015c99434702d557c289543391e1 100644 (file)
--- a/skill.py
+++ b/skill.py
@@ -20,35 +20,35 @@ def add_item(name: str) -> str:
     return '\n'.join(Data().add_item(name))
 
 @mcp.tool
     return '\n'.join(Data().add_item(name))
 
 @mcp.tool
-def buy(items:str) -> 'list[str]':
-    return Data().purchase_items(items)
+def buy(items:str) -> str:
+    return '\n'.join(Data().purchase_items(items))
 
 @mcp.tool
 
 @mcp.tool
-def list_bought(store:str) -> 'list[str]':
-    return Data().list_purchases(store)
-#
+def list_bought(store:str) -> str:
+    return '\n'.join(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 clear(store_name: str, clear_all:bool=False) -> 'list[str]':
 #    return Data().clear_list(store_name, clear_all)
-#
-#
+
+
 @mcp.tool
 @mcp.tool
-def shop_at(store_name:str) -> 'list[str]':
+def shop_at(store_name:str) -> str:
     '''Select store to shop at'''
     '''Select store to shop at'''
-    return Data().get_shopping_list(store_name)
+    return '\n'.join(Data().get_shopping_list(store_name))
 
 
 @mcp.tool
 
 
 @mcp.tool
-def list() -> 'list[str]':
+def list() -> str:
     '''Use previous store'''
     '''Use previous store'''
-    return Data().get_last_shopping_list()
-#
-#
+    return '\n'.join(Data().get_last_shopping_list())
+
+
 #@mcp.tool
 #def list_stores() -> 'list[str]':
 #    return Data().get_stores()
 #@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)
 #@mcp.tool
 #def list_purchases(store: str) -> 'list[str]':
 #    return Data().list_purchases(store)