Skip to main content
Glama

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
NameRequiredDescriptionDefault

No arguments

Implementation Reference

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

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