getLatestShotId
Retrieve the latest espresso shot ID from Gaggiuino espresso machine controllers using the MCP server, enabling AI clients to access real-time data for analysis.
Instructions
Get latest espresso shot id.
Tool call template
This tool declares no required parameters. Add optional parameters from the input schema as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {},
"name": "getLatestShotId"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Implementation Reference
- gaggiuino.py:94-105 (handler)The main handler function for the 'getLatestShotId' tool. It is decorated with @mcp.tool() for registration and fetches the latest shot ID from the espresso machine's API endpoint using the make_gg_request helper.
@mcp.tool() async def getLatestShotId() -> str: """Get latest espresso shot id. """ url = f"{API_BASE}/api/shots/latest" data = await make_gg_request(url) if not data: return "Unable to fetch shot or no shot found." id = data[0] return id