remove_ingredients_from_shelf
Remove specific ingredients from your bar shelf inventory by their IDs to keep your cocktail-making supplies current and accurate.
Instructions
Remove ingredients from your bar shelf by their IDs
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| ingredient_ids | Yes | Array of ingredient IDs to remove from shelf | |
| bar_id | No | Bar ID (optional if BAR_ASSISTANT_BAR_ID is set) |
Implementation Reference
- src/bar_assistant_mcp/server.py:322-342 (handler)The handler logic within the call_tool function that removes ingredients from the bar shelf by posting the ingredient IDs to the API batch-delete endpoint.elif name == "remove_ingredients_from_shelf": bar_id = arguments.get("bar_id") or CONFIG["bar_id"] if not bar_id: return [TextContent( type="text", text="Error: No bar ID provided. Use list_bars to find your bar ID or set BAR_ASSISTANT_BAR_ID." )] ingredient_ids = [int(id) for id in arguments["ingredient_ids"]] response = await client.post( f"{CONFIG['api_url']}/bars/{int(bar_id)}/ingredients/batch-delete", headers=get_headers(bar_id), json={"ingredients": ingredient_ids} ) response.raise_for_status() return [TextContent( type="text", text=f"Successfully removed {len(ingredient_ids)} ingredients from your bar shelf!" )]
- src/bar_assistant_mcp/server.py:186-204 (registration)Tool registration in list_tools() including the name, description, and input schema for validating ingredient_ids (required array of numbers) and optional bar_id.Tool( name="remove_ingredients_from_shelf", description="Remove ingredients from your bar shelf by their IDs", inputSchema={ "type": "object", "properties": { "ingredient_ids": { "type": "array", "items": {"type": "number"}, "description": "Array of ingredient IDs to remove from shelf" }, "bar_id": { "type": "number", "description": "Bar ID (optional if BAR_ASSISTANT_BAR_ID is set)" } }, "required": ["ingredient_ids"] } ),