Skip to main content
Glama
the-real-py

Bar Assistant MCP Server

by the-real-py

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
NameRequiredDescriptionDefault
ingredient_idsYesArray of ingredient IDs to remove from shelf
bar_idNoBar ID (optional if BAR_ASSISTANT_BAR_ID is set)

Implementation Reference

  • 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!"
        )]
  • 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"]
        }
    ),

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/the-real-py/bar-assistant-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server