agora_get_product_detail
Retrieve detailed information for a specific product by providing its unique slug, enabling enhanced product discovery and decision-making in AI-driven conversations.
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-77 (handler)The handler function decorated with @mcp.tool() that implements the agora_get_product_detail tool by calling the Agora client's get_product_detail method and processing 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-19 (helper)Helper function to lazily create and return the Agora client instance, used by the tool to avoid early initialization errors.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 process responses from Agora API calls, handling both raw HTTP responses and pre-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