agora_get_product_detail
Retrieve detailed product information from Agora MCP by providing a product slug, enabling AI assistants to access comprehensive product data for user queries.
Instructions
Get details for a specific product in Agora.
Args:
slug: The product slug, it usually looks something like 'royal-blue-waxed-shoe-laces-6f2049ef-0d08-4a79-8937-025bb596092f-1718242165922'
Returns:
The product details.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| slug | Yes |
Implementation Reference
- src/agora_mcp/server.py:64-76 (handler)The main handler function for the 'agora_get_product_detail' tool. It uses the Agora client to fetch product details by slug and handles the response.@mcp.tool() async def agora_get_product_detail(slug: str) -> Dict: """ Get details for a specific product in Agora. Args: slug: The product slug, it usually looks something like 'royal-blue-waxed-shoe-laces-6f2049ef-0d08-4a79-8937-025bb596092f-1718242165922' Returns: The product details. """ response = get_agora().get_product_detail(slug=slug) return handle_response(response)
- src/agora_mcp/server.py:11-18 (helper)Helper function to lazily initialize and return the Agora client instance, used by the tool handlers.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-30 (helper)Helper function to process 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