Update agents/tools/mcp_tools.py
Browse files
agents/tools/mcp_tools.py
CHANGED
|
@@ -13,8 +13,8 @@ from crewai.tools import tool
|
|
| 13 |
class MCPTools():
|
| 14 |
# Chess position evaluation
|
| 15 |
|
| 16 |
-
@tool("
|
| 17 |
-
def
|
| 18 |
"""Get best move with continuation in UCI notation for chess position in FEN.
|
| 19 |
|
| 20 |
Args:
|
|
@@ -27,7 +27,7 @@ class MCPTools():
|
|
| 27 |
RuntimeError: If processing fails
|
| 28 |
|
| 29 |
"""
|
| 30 |
-
print(f"🤖 MCPTools:
|
| 31 |
|
| 32 |
try:
|
| 33 |
mcp_url = os.getenv("MCP_SSE_URL", MCP_SSE_URL_CHESS_POSITION_EVALUATION)
|
|
@@ -38,8 +38,9 @@ class MCPTools():
|
|
| 38 |
arguments={"fen": fen}
|
| 39 |
)
|
| 40 |
|
| 41 |
-
print(f"🤖 MCPTools:
|
| 42 |
|
| 43 |
return result
|
| 44 |
except Exception as e:
|
|
|
|
| 45 |
raise RuntimeError(f"Processing failed: {str(e)}")
|
|
|
|
| 13 |
class MCPTools():
|
| 14 |
# Chess position evaluation
|
| 15 |
|
| 16 |
+
@tool("Best Move Tool")
|
| 17 |
+
def best_move_tool(fen: str) -> str:
|
| 18 |
"""Get best move with continuation in UCI notation for chess position in FEN.
|
| 19 |
|
| 20 |
Args:
|
|
|
|
| 27 |
RuntimeError: If processing fails
|
| 28 |
|
| 29 |
"""
|
| 30 |
+
print(f"🤖 MCPTools: best_move_tool: fen={fen}")
|
| 31 |
|
| 32 |
try:
|
| 33 |
mcp_url = os.getenv("MCP_SSE_URL", MCP_SSE_URL_CHESS_POSITION_EVALUATION)
|
|
|
|
| 38 |
arguments={"fen": fen}
|
| 39 |
)
|
| 40 |
|
| 41 |
+
print(f"🤖 MCPTools: best_move_tool: result={result}")
|
| 42 |
|
| 43 |
return result
|
| 44 |
except Exception as e:
|
| 45 |
+
print(f"🤖 MCPTools: best_move_tool: result={str(e)}")
|
| 46 |
raise RuntimeError(f"Processing failed: {str(e)}")
|