Skip to main content
Glama

list_chains

Retrieve a detailed list of all Kroger-owned chains for store identification and location-based services.

Instructions

Get a list of all Kroger-owned chains. Returns: Dictionary containing chain information

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • The main handler function for the 'list_chains' tool. It uses get_client_credentials_client() to get a client, calls client.location.list_chains(), formats the data, and returns a structured dictionary with success status.
    @mcp.tool() async def list_chains(ctx: Context = None) -> Dict[str, Any]: """ Get a list of all Kroger-owned chains. Returns: Dictionary containing chain information """ if ctx: await ctx.info("Getting list of Kroger chains") client = get_client_credentials_client() try: chains = client.location.list_chains() if not chains or "data" not in chains or not chains["data"]: return { "success": False, "message": "No chains found", "data": [] } # Format chain data formatted_chains = [ { "name": chain.get("name"), "division_numbers": chain.get("divisionNumbers", []) } for chain in chains["data"] ] if ctx: await ctx.info(f"Found {len(formatted_chains)} chains") return { "success": True, "count": len(formatted_chains), "data": formatted_chains } except Exception as e: if ctx: await ctx.error(f"Error listing chains: {str(e)}") return { "success": False, "error": str(e), "data": [] }
  • The registration of all info_tools, including 'list_chains', by calling the module's register_tools function on the MCP server instance.
    info_tools.register_tools(mcp)

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/CupOfOwls/kroger-mcp'

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