agora_get_user_orders
Retrieve all purchase orders for the current user on SearchAgora to view transaction history and manage past purchases.
Instructions
Get all orders for the current user.
Returns:
A list of orders.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Implementation Reference
- src/agora_mcp/server.py:142-151 (handler)The handler function implementing the 'agora_get_user_orders' tool logic. It is registered via the @mcp.tool() decorator. Calls get_agora().get_user_orders() and processes the response with handle_response.@mcp.tool() async def agora_get_user_orders() -> List[Dict]: """ Get all orders for the current user. Returns: A list of orders. """ response = get_agora().get_user_orders() return handle_response(response)
- src/agora_mcp/server.py:11-19 (helper)Helper function to lazily initialize and return the Agora client instance, used by the tool.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, returning status code and data or just the 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