Skip to main content
Glama
test_tools.py1.26 kB
#!/usr/bin/env python3 import asyncio from src.server import mcp async def test_tools(): try: tools_response = await mcp.list_tools() print(f'Tools response type: {type(tools_response)}') print(f'Tools response: {tools_response}') # Try different ways to access tools if hasattr(tools_response, 'tools'): tools = tools_response.tools print(f'Number of tools: {len(tools)}') print('Tool names:') for tool in tools: print(f' - {tool.name}') elif isinstance(tools_response, list): print(f'Number of tools: {len(tools_response)}') print('Tool names:') for tool in tools_response: print(f' - {tool.name if hasattr(tool, "name") else tool}') else: print('Unknown tools response format') return True except Exception as e: print(f'Error listing tools: {e}') import traceback traceback.print_exc() return False if __name__ == "__main__": success = asyncio.run(test_tools()) if success: print("\n✅ Tools are properly registered!") else: print("\n❌ Tools are not being registered properly")

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/DynamicEndpoints/PowerShell-Exec-MCP-Server'

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