get_project_details
Retrieve detailed project information by providing a project ID using the tool on the WeWork MCP Server, enabling efficient project management and data analysis.
Instructions
Lấy chi tiết của một dự án
Args:
project_id: ID của dự án
Returns:
Chi tiết dự án bao gồm thông tin cơ bản
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| project_id | Yes |
Implementation Reference
- wework_mcp_server.py:87-117 (handler)The handler function for the MCP tool 'get_project_details'. It is registered using the @mcp.tool() decorator. The function retrieves project details using the WeWorkClient instance based on the provided project_id, with proper error handling and logging.@mcp.tool() def get_project_details(project_id: str) -> Dict[str, Any]: """ Lấy chi tiết của một dự án Args: project_id: ID của dự án Returns: Chi tiết dự án bao gồm thông tin cơ bản """ try: if not wework_client: return {'error': 'WeWork client not initialized'} logger.info(f"Getting project details for ID: {project_id}") project_info = wework_client.get_project_info(project_id) if project_info: return { 'success': True, 'project': project_info } else: return { 'error': f'Không tìm thấy dự án với ID: {project_id}', 'success': False } except Exception as e: logger.error(f"Error in get_project_details: {e}") return {'error': str(e), 'success': False}