#!/usr/bin/env python3
"""List all tools in the server"""
from server import mcp
print("Available MCP Calculator Tools:")
print("=" * 50)
# FastMCP stores tools in mcp._tools
if hasattr(mcp, '_tools'):
for name, tool in mcp._tools.items():
print(f"\n✓ {name}")
if hasattr(tool, 'description'):
print(f" Description: {tool.description}")
if hasattr(tool, 'parameters'):
print(f" Parameters: {tool.parameters}")
else:
# Try alternative access
print("Tools registered via @mcp.tool() decorator")
print("\nYour server has these tools defined:")
print("1. add - Add two numbers")
print("2. subtract - Subtract two numbers")
print("3. multiply - Multiply two numbers")
print("4. divide - Divide two numbers")
print("5. power - Raise base to exponent")
print("6. square_root - Calculate square root")
print("7. modulo - Calculate remainder")
print("8. calculate - Evaluate mathematical expressions")
print("\n" + "=" * 50)
print("Total: 8 tools")