Skip to main content
Glama
CupOfOwls

Kroger MCP Server

get_chain_details

Retrieve specific details about Kroger store chains by providing the chain name, enabling users to access comprehensive information for grocery shopping decisions.

Instructions

    Get detailed information about a specific Kroger chain.
    
    Args:
        chain_name: Name of the chain to get details for
    
    Returns:
        Dictionary containing chain details
    

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
chain_nameYes

Implementation Reference

  • The handler function for 'get_chain_details' tool. It takes a chain_name parameter, uses get_client_credentials_client to fetch chain details from the Kroger API, and returns formatted chain information or error details.
    @mcp.tool()
    async def get_chain_details(
        chain_name: str,
        ctx: Context = None
    ) -> Dict[str, Any]:
        """
        Get detailed information about a specific Kroger chain.
        
        Args:
            chain_name: Name of the chain to get details for
        
        Returns:
            Dictionary containing chain details
        """
        if ctx:
            await ctx.info(f"Getting details for chain: {chain_name}")
        
        client = get_client_credentials_client()
        
        try:
            chain_details = client.location.get_chain(chain_name)
            
            if not chain_details or "data" not in chain_details:
                return {
                    "success": False,
                    "message": f"Chain '{chain_name}' not found"
                }
            
            chain = chain_details["data"]
            
            return {
                "success": True,
                "name": chain.get("name"),
                "division_numbers": chain.get("divisionNumbers", [])
            }
            
        except Exception as e:
            if ctx:
                await ctx.error(f"Error getting chain details: {str(e)}")
            return {
                "success": False,
                "error": str(e)
            }
  • Top-level registration in the MCP server where info_tools.register_tools(mcp) is called, which in turn registers the get_chain_details tool via @mcp.tool() decorator.
    # Register all tools from the modules
    location_tools.register_tools(mcp)
    product_tools.register_tools(mcp)
    cart_tools.register_tools(mcp)
    info_tools.register_tools(mcp)
    profile_tools.register_tools(mcp)
    utility_tools.register_tools(mcp)
    auth_tools.register_tools(mcp)
Behavior2/5

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

With no annotations provided, the description carries full burden for behavioral disclosure. It states this is a read operation ('Get') but doesn't mention authentication requirements, rate limits, error handling, or what happens if the chain doesn't exist. For a tool with zero annotation coverage, this represents significant gaps in behavioral context.

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

Conciseness4/5

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

The description is appropriately brief with three sentences that each serve a purpose: stating the tool's function, documenting the parameter, and describing the return value. The structure is clear and front-loaded with the main purpose. Minor points deducted for the generic 'Dictionary containing chain details' which could be more specific.

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 zero annotation coverage, no output schema, and a single parameter with 0% schema description coverage, the description is insufficiently complete. It doesn't explain what 'chain details' includes, authentication requirements, error conditions, or how this differs from similar tools. For a tool in a complex Kroger API context, more contextual information is needed.

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 0%, so the description must compensate. It documents the single parameter 'chain_name' and explains it's 'Name of the chain to get details for', which adds meaningful context beyond the bare schema. However, it doesn't specify format requirements, examples, or constraints, leaving some ambiguity about valid inputs.

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 verb 'Get' and the resource 'detailed information about a specific Kroger chain', making the purpose unambiguous. It distinguishes from sibling 'list_chains' by focusing on a single chain's details rather than listing multiple chains. However, it doesn't specify what 'detailed information' includes, 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 like 'check_chain_exists' or 'list_chains'. It mentions a specific chain is required but doesn't explain prerequisites, error conditions, or typical use cases. This leaves the agent with minimal context for tool selection.

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

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