Skip to main content
Glama

test_connection

Verify connectivity to WeWork API by testing the connection and retrieving real-time status information, ensuring reliable access for project management and data analysis.

Instructions

Test kết nối với WeWork API Returns: Thông tin về trạng thái kết nối

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • The handler function for the MCP tool 'test_connection'. It tests the connection to the WeWork API by attempting to fetch projects using the WeWorkClient. Includes the @mcp.tool() decorator which registers the tool.
    @mcp.tool() def test_connection() -> Dict[str, Any]: """ Test kết nối với WeWork API Returns: Thông tin về trạng thái kết nối """ try: if not wework_client: return { 'success': False, 'error': 'WeWork client not initialized', 'token_available': bool(WEWORK_ACCESS_TOKEN) } logger.info("Testing WeWork API connection") projects = wework_client.fetch_projects() return { 'success': True, 'connection_status': 'Connected', 'projects_count': len(projects) if projects else 0, 'token_available': bool(WEWORK_ACCESS_TOKEN), 'sample_projects': [p.get('name', 'Unknown') for p in (projects[:3] if projects else [])] } except Exception as e: logger.error(f"Error in test_connection: {e}") return { 'success': False, 'error': str(e), 'token_available': bool(WEWORK_ACCESS_TOKEN) }

Other Tools

Related 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/FOX2920/Aplus-MCP'

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