Skip to main content
Glama

get_authentication_info

Retrieve authentication state and token details to verify access status for Kroger's grocery shopping functionality via the MCP server.

Instructions

Get information about the current authentication state and token. Returns: Dictionary containing authentication information

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • The handler function that implements the core logic of the get_authentication_info tool. It retrieves authentication details from the Kroger client, including token info (with previews for security), and handles errors.
    @mcp.tool() async def get_authentication_info(ctx: Context = None) -> Dict[str, Any]: """ Get information about the current authentication state and token. Returns: Dictionary containing authentication information """ if ctx: await ctx.info("Getting authentication information") try: client = get_authenticated_client() result = { "success": True, "authenticated": True, "message": "User is authenticated" } # Get token information if available if hasattr(client.client, 'token_info') and client.client.token_info: token_info = client.client.token_info result.update({ "token_type": token_info.get("token_type", "Unknown"), "has_refresh_token": "refresh_token" in token_info, "expires_in": token_info.get("expires_in"), "scope": token_info.get("scope", "Unknown") }) # Don't expose the actual tokens for security result["access_token_preview"] = f"{token_info.get('access_token', '')[:10]}..." if token_info.get('access_token') else "N/A" if "refresh_token" in token_info: result["refresh_token_preview"] = f"{token_info['refresh_token'][:10]}..." # Get token file information if available if hasattr(client.client, 'token_file') and client.client.token_file: result["token_file"] = client.client.token_file return result except Exception as e: if ctx: await ctx.error(f"Error getting authentication info: {str(e)}") return { "success": False, "error": str(e), "authenticated": False }
  • Registers all tools from the profile_tools module, including get_authentication_info, with the FastMCP server instance.
    profile_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