Skip to main content
Glama
the-real-py

Bar Assistant MCP Server

by the-real-py

add_ingredients_to_shelf

Add ingredients to your bar shelf by their IDs to manage your home bar inventory and discover cocktails you can make.

Instructions

Add ingredients to your bar shelf by their IDs

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
ingredient_idsYesArray of ingredient IDs to add to shelf
bar_idNoBar ID (optional if BAR_ASSISTANT_BAR_ID is set)

Implementation Reference

  • The execution logic for the 'add_ingredients_to_shelf' tool. Extracts bar_id and ingredient_ids, sends a POST request to batch-add ingredients to the bar shelf via the API, and returns a success message.
    elif name == "add_ingredients_to_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-store",
            headers=get_headers(bar_id),
            json={"ingredients": ingredient_ids}
        )
        response.raise_for_status()
        
        return [TextContent(
            type="text",
            text=f"Successfully added {len(ingredient_ids)} ingredients to your bar shelf!"
        )]
  • Registration of the 'add_ingredients_to_shelf' tool in the list_tools() function, including its name, description, and input schema definition.
    Tool(
        name="add_ingredients_to_shelf",
        description="Add ingredients to your bar shelf by their IDs",
        inputSchema={
            "type": "object",
            "properties": {
                "ingredient_ids": {
                    "type": "array",
                    "items": {"type": "number"},
                    "description": "Array of ingredient IDs to add to shelf"
                },
                "bar_id": {
                    "type": "number",
                    "description": "Bar ID (optional if BAR_ASSISTANT_BAR_ID is set)"
                }
            },
            "required": ["ingredient_ids"]
        }
    ),
  • Input schema for the 'add_ingredients_to_shelf' tool, defining required ingredient_ids array and optional bar_id.
        inputSchema={
            "type": "object",
            "properties": {
                "ingredient_ids": {
                    "type": "array",
                    "items": {"type": "number"},
                    "description": "Array of ingredient IDs to add to shelf"
                },
                "bar_id": {
                    "type": "number",
                    "description": "Bar ID (optional if BAR_ASSISTANT_BAR_ID is set)"
                }
            },
            "required": ["ingredient_ids"]
        }
    ),
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations provided, the description carries the full burden of behavioral disclosure. It states the tool adds ingredients but doesn't cover critical aspects like whether this is a mutating operation, permission requirements, error handling for invalid IDs, or if duplicates are allowed. This leaves significant gaps in understanding the tool's behavior.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single, efficient sentence that directly states the tool's purpose without unnecessary words. It is front-loaded and appropriately sized, making it easy to parse while conveying the core action and mechanism.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the tool's complexity as a mutating operation with no annotations and no output schema, the description is incomplete. It fails to address behavioral traits like side effects, response format, or error conditions, which are crucial for an agent to use this tool effectively in context with its siblings.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100%, so the input schema fully documents both parameters. The description adds minimal value by mentioning 'by their IDs', which aligns with the schema's 'ingredient_ids' parameter, but doesn't provide additional context like format examples or usage tips beyond what's already in the structured data.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the action ('Add ingredients') and the target resource ('to your bar shelf'), with specificity about the mechanism ('by their IDs'). However, it doesn't explicitly distinguish this tool from its sibling 'remove_ingredients_from_shelf' beyond the opposite action, missing an opportunity for clearer differentiation.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

No guidance is provided on when to use this tool versus alternatives like 'search_ingredients' for discovery or 'get_shelf_ingredients' for viewing. The description lacks context about prerequisites, such as needing valid ingredient IDs or bar access, leaving usage scenarios implied but not stated.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

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