Skip to main content
Glama
utility_tools.py960 B
""" Utility tools for the Kroger MCP server """ from typing import Dict, Any from datetime import datetime from fastmcp import Context def register_tools(mcp): """Register utility tools with the FastMCP server""" @mcp.tool() async def get_current_datetime(ctx: Context = None) -> Dict[str, Any]: """ Get the current system date and time. This tool is useful for comparing with cart checkout dates, order history, or any other time-sensitive operations. Returns: Dictionary containing current date and time information """ now = datetime.now() return { "success": True, "datetime": now.isoformat(), "date": now.date().isoformat(), "time": now.time().isoformat(), "timestamp": int(now.timestamp()), "formatted": now.strftime("%A, %B %d, %Y at %I:%M:%S %p") }

Implementation Reference

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