Skip to main content
Glama
CupOfOwls

Kroger MCP Server

get_user_profile

Retrieve authenticated user profile data from Kroger, including personal information and account details for grocery shopping services.

Instructions

    Get the authenticated user's Kroger profile information.
    
    Returns:
        Dictionary containing user profile data
    

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • The main handler function for the 'get_user_profile' tool. It retrieves the authenticated user's Kroger profile using the Identity API client, returning the profile ID and success status.
    async def get_user_profile(ctx: Context = None) -> Dict[str, Any]:
        """
        Get the authenticated user's Kroger profile information.
        
        Returns:
            Dictionary containing user profile data
        """
        if ctx:
            await ctx.info("Getting user profile information")
        
        try:
            client = get_authenticated_client()
            profile = client.identity.get_profile()
            
            if profile and "data" in profile:
                profile_id = profile["data"].get("id", "N/A")
                
                if ctx:
                    await ctx.info(f"Retrieved profile for user ID: {profile_id}")
                
                return {
                    "success": True,
                    "profile_id": profile_id,
                    "message": "User profile retrieved successfully",
                    "note": "The Kroger Identity API only provides the profile ID for privacy reasons."
                }
            else:
                return {
                    "success": False,
                    "message": "Failed to retrieve user profile"
                }
                
        except Exception as e:
            if ctx:
                await ctx.error(f"Error getting user profile: {str(e)}")
            return {
                "success": False,
                "error": str(e)
            }
  • Registers the profile tools, including 'get_user_profile', by calling the register_tools function from the profile_tools module.
    profile_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') and implies it returns data, but lacks details on permissions, rate limits, error conditions, or data freshness. For a tool with zero annotation coverage, this is insufficient to guide safe invocation.

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 brief and front-loaded with the core purpose in the first sentence. The second sentence about return values is useful but could be integrated more seamlessly. There's minimal waste, though slight room for improvement in flow.

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 simplicity (0 parameters, no output schema), the description is adequate but incomplete. It covers what the tool does and the return type, but lacks behavioral context (e.g., authentication requirements, data scope). For a user profile tool with no annotations, more guidance would be helpful.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The tool has 0 parameters, and schema description coverage is 100% (empty schema). The description doesn't need to explain parameters, so it meets baseline expectations. No additional parameter context is required or provided.

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 resource ('authenticated user's Kroger profile information'), making the purpose unambiguous. It distinguishes from siblings like 'get_authentication_info' by specifying profile data rather than authentication status. However, it doesn't explicitly differentiate from other user-related tools, keeping it at 4 rather than 5.

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 prerequisites (e.g., authentication status), compare to siblings like 'get_user_zip_code' or 'get_authentication_info', or specify use cases. This leaves the agent without 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