diff --git a/README.md b/README.md index e5b554d..5bb317e 100644 --- a/README.md +++ b/README.md @@ -69,3 +69,9 @@ Modifier le fichier `claude_desktop_config.json` ## Utilisation Le projet est assez simple d'utilisation car une fois le serveur lancé, il vous suffit d'écrire des prompts à l'aide de votre application Desktop de LLM. Il est aussi possible d'avoir accès à une aide de génération de prompt intégrée. + + +## Documentation +### Tools +Les outils implementes sont : + diff --git a/server.py b/server.py index 33a6412..c8323c9 100644 --- a/server.py +++ b/server.py @@ -76,7 +76,7 @@ async def save_game(slot:int): "error": str(e) } -@mcp.resource(name="game_state", description="Retrieves the current game state") +@mcp.tool(name="game_state", description="Retrieves the current game state") async def get_game_state() -> str: """Get the current game state as a serialized string.""" logging.info("Fetching current game state") @@ -189,7 +189,7 @@ async def perform_stat_modification(entity_id:str, stat:Stat, value:int=0): "error": str(e) } -@mcp.resource(name="current_event") +@mcp.tool(name="current_event") async def get_current_event() -> Dict[str, Any]: """Get the current event in the game.""" try: @@ -253,7 +253,7 @@ async def equip_item_to_entity(entity_id: str, item_id: str) -> Dict[str, Any]: "error": str(e) } -@mcp.resource(name="item_properties") +@mcp.tool(name="item_properties") async def get_item_properties(item_id: str) -> Dict[str, Any]: """Get the full information of an item. @@ -381,7 +381,7 @@ async def create_npc(name: str, strength: int, dexterity: int, intelligence: int "error": str(e) } -@mcp.resource(name="all_entities_status") +@mcp.tool(name="all_entities_status") async def get_all_entities_status(): """ Get the status of all entities in the game. @@ -394,7 +394,7 @@ async def get_all_entities_status(): "npcs": npcs } -@mcp.resource(name="entity_status") +@mcp.tool(name="entity_status") async def get_entity_status(entity_id: str) -> Dict[str, Any]: """Get the full information of an entity (player or NPC).