agora_get_order
Retrieve specific order details by providing the order ID in Agora MCP. Facilitates access to order information for better tracking and management.
Instructions
Get details for a specific order in Agora.
Args:
order_id: The order ID.
Returns:
The order details.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| order_id | Yes |
Implementation Reference
- src/agora_mcp/server.py:127-139 (handler)The agora_get_order tool handler function. It is registered via the @mcp.tool() decorator, fetches the order details using the Agora client, and processes the response.@mcp.tool() async def agora_get_order(order_id: str) -> Dict: """ Get details for a specific order in Agora. Args: order_id: The order ID. Returns: The order details. """ response = get_agora().get_order(order_id=order_id) return handle_response(response)
- src/agora_mcp/server.py:11-19 (helper)Helper function to lazily initialize the Agora client instance.def get_agora(): """Get or create an Agora instance. We want to create the class instance inside the tool, so the init errors will bubble up to the tool and hence the MCP client instead of silently failing during the server creation. """ return Agora()
- src/agora_mcp/server.py:21-31 (helper)Helper function to standardize responses from Agora API calls, handling both raw HTTP responses and processed data.def handle_response(response): """ Handle responses from Agora methods. """ if hasattr(response, 'status_code'): # This is a raw response object try: return response.status_code, response.json() except: return response.status_code, response.text # This is already processed data (like a dictionary) return response