Skip to main content
Glama
the-real-py

Bar Assistant MCP Server

by the-real-py

get_shelf_cocktails

Find cocktails you can make with ingredients currently available on your bar shelf. Use this tool to discover drink recipes based on what you have in stock.

Instructions

Get all cocktails you can make with ingredients on your bar shelf

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
bar_idNoBar ID (optional if BAR_ASSISTANT_BAR_ID is set)
pageNoPage number for pagination (optional)

Implementation Reference

  • Handler implementation for the 'get_shelf_cocktails' tool. Fetches cocktails makeable with bar shelf ingredients from the API, handles pagination and bar_id, formats the response as text.
    elif name == "get_shelf_cocktails":
        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."
            )]
        
        params = {}
        if arguments.get("page"):
            params["page"] = arguments["page"]
        
        response = await client.get(
            f"{CONFIG['api_url']}/bars/{int(bar_id)}/cocktails",
            headers=get_headers(bar_id),
            params=params
        )
        response.raise_for_status()
        data = response.json()
        
        result = f"You can make {len(data.get('data', []))} cocktails:\n\n"
        for cocktail in data.get('data', []):
            result += f"**{cocktail['name']}** (ID: {cocktail['id']})\n"
            if cocktail.get('short_ingredients'):
                result += f"  • {', '.join(cocktail['short_ingredients'])}\n"
        
        return [TextContent(type="text", text=result)]
  • Registration of the 'get_shelf_cocktails' tool in list_tools(), including its name, description, and input schema.
    Tool(
        name="get_shelf_cocktails",
        description="Get all cocktails you can make with ingredients on your bar shelf",
        inputSchema={
            "type": "object",
            "properties": {
                "bar_id": {
                    "type": "number",
                    "description": "Bar ID (optional if BAR_ASSISTANT_BAR_ID is set)"
                },
                "page": {
                    "type": "number",
                    "description": "Page number for pagination (optional)"
                }
            }
        }
    ),
Behavior2/5

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

No annotations are provided, so the description carries the full burden of behavioral disclosure. It states the tool retrieves cocktails based on shelf ingredients but lacks details on permissions, rate limits, pagination behavior (implied by the 'page' parameter but not explained), or response format. For a read operation with zero annotation coverage, this is a significant gap in transparency.

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's front-loaded and wastes no space, making it easy for an agent to parse quickly. Every part of the sentence earns its place by conveying essential information.

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

Completeness3/5

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

Given the tool's moderate complexity (a read operation with 2 optional parameters) and no annotations or output schema, the description is minimally adequate. It explains what the tool does but lacks behavioral details (e.g., pagination, response structure) and usage context. It meets the bare minimum for a simple tool but doesn't fully compensate for the absence of structured data.

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?

The input schema has 100% description coverage, with clear documentation for both parameters ('bar_id' and 'page'). The description doesn't add any meaning beyond the schema, such as explaining how 'bar_id' relates to 'BAR_ASSISTANT_BAR_ID' or detailing pagination logic. With high schema coverage, the baseline score of 3 is appropriate, as the schema handles parameter semantics adequately.

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 tool's purpose: 'Get all cocktails you can make with ingredients on your bar shelf.' It specifies the verb ('Get'), resource ('cocktails'), and scope ('with ingredients on your bar shelf'), making the function unambiguous. However, it doesn't explicitly differentiate from sibling tools like 'get_shelf_ingredients' or 'search_ingredients,' which prevents a perfect score.

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?

The description provides no guidance on when to use this tool versus alternatives. It doesn't mention sibling tools like 'get_shelf_ingredients' (which lists ingredients) or 'search_ingredients' (which might find cocktails by ingredient), leaving the agent to infer usage context. There's no explicit when/when-not or alternative recommendations.

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