list_bars
Retrieve all accessible bars and their IDs to manage your home bar inventory and cocktail discovery with Bar Assistant.
Instructions
List all bars you have access to and get their IDs
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Implementation Reference
- src/bar_assistant_mcp/server.py:231-244 (handler)Handler implementation for the list_bars tool. Fetches bars from the API endpoint and returns a formatted text list of available bars with their IDs and slugs.if name == "list_bars": response = await client.get( f"{CONFIG['api_url']}/bars", headers=get_headers() ) response.raise_for_status() data = response.json() result = "Available bars:\n\n" for bar in data.get('data', []): result += f"**{bar['name']}** (ID: {bar['id']})\n" result += f" Slug: {bar['slug']}\n\n" return [TextContent(type="text", text=result)]
- src/bar_assistant_mcp/server.py:125-132 (registration)Registration of the list_bars tool in the list_tools() function, defining its name, description, and input schema (no required parameters).Tool( name="list_bars", description="List all bars you have access to and get their IDs", inputSchema={ "type": "object", "properties": {} } ),