Skip to main content
Glama
debug_mcp_response.py•715 B
#!/usr/bin/env python3 """Debug MCP tool response.""" import asyncio import json from fhir_graphrag_mcp_server import call_tool async def debug(): result = await call_tool("get_entity_statistics", {}) print("Result type:", type(result)) print("Result length:", len(result)) print("\nFirst element:") print(" Type:", type(result[0])) print(" Text:", result[0].text) # Try to parse JSON try: data = json.loads(result[0].text) print("\nParsed JSON keys:", data.keys()) print("Full data:") print(json.dumps(data, indent=2)) except Exception as e: print(f"\nFailed to parse JSON: {e}") if __name__ == "__main__": asyncio.run(debug())

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/isc-tdyar/medical-graphrag-assistant'

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