removed the resource flags
This commit is contained in:
@@ -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 :
|
||||
|
||||
|
||||
10
server.py
10
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).
|
||||
|
||||
|
||||
Reference in New Issue
Block a user