getShotData
Retrieve detailed espresso shot data by ID from Gaggiuino MCP Server, enabling analysis and insights directly from the machine controller.
Instructions
Get espresso shot data for an id.
Args:
id: Shot id
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| id | Yes |
Implementation Reference
- gaggiuino.py:107-121 (handler)The handler function for the 'getShotData' tool. It is decorated with @mcp.tool() for registration. Fetches shot data from the Gaggiuino API endpoint, handles errors, formats the data using format_shot, and returns it as a JSON string.@mcp.tool() async def getShotData(id: str) -> str: """Get espresso shot data for an id. Args: id: Shot id """ url = f"{API_BASE}/api/shots/{id}" data = await make_gg_request(url) if not data: return "Unable to fetch shot or no shot found." shot = format_shot(data) return shot