#!/usr/bin/env python3
"""
Simple test to check what tools the server is exposing.
"""
import asyncio
from mcp import ClientSession, StdioServerParameters
from mcp.client.stdio import stdio_client
async def test_server_tools():
"""Test what tools the server is exposing."""
server_params = StdioServerParameters(
command="python",
args=["src/server/main.py"]
)
try:
async with stdio_client(server_params) as (read, write):
async with ClientSession(read, write) as session:
await session.initialize()
# List available tools
tools_result = await session.list_tools()
print("Available tools:")
for tool in tools_result.tools:
print(f" - {tool.name}: {tool.description}")
if hasattr(tool, 'inputSchema'):
print(f" Schema: {tool.inputSchema}")
except Exception as e:
print(f"Error: {e}")
if __name__ == "__main__":
asyncio.run(test_server_tools())