Skip to main content
Glama
ImDPS
by ImDPS
test_server_tools.py1.1 kB
#!/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())

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/ImDPS/MCP'

If you have feedback or need assistance with the MCP directory API, please join our Discord server