Skip to main content
Glama
ai-mcp-garage

MyFitnessPal MCP Server

get_water_intake

Retrieve daily water consumption data from MyFitnessPal for tracking hydration. Specify a date in YYYY-MM-DD format to view intake for that day.

Instructions

Get water consumption for a specific day.

Args: date: Date in YYYY-MM-DD format (defaults to today)

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
dateNo

Implementation Reference

  • Handler function decorated with @mcp.tool, implementing the get_water_intake tool. Fetches daily water intake from MyFitnessPal client, converts ml to oz and cups, formats progress report as markdown, and handles errors.
    @mcp.tool
    def get_water_intake(date: Optional[str] = None):
        """
        Get water consumption for a specific day.
        
        Args:
            date: Date in YYYY-MM-DD format (defaults to today)
        """
        try:
            target_date = parse_date(date)
            client = get_client()
            
            # Fetch day data
            day = client.get_day(target_date)
            water_ml = day.water  # Library returns milliliters
            water_oz = water_ml / 29.5735  # Convert to ounces
            water_cups = water_ml / 236.588  # Convert to cups
            
            output = f"# Water Intake for {target_date.strftime('%B %d, %Y')}\n\n"
            
            if water_ml > 0:
                output += f"**Amount**: {water_oz:.0f} oz ({water_cups:.1f} cups / {water_ml:.0f} ml)\n"
            else:
                output += "No water intake logged for this day.\n"
            
            # Add helpful context
            output += f"\n*Recommended daily intake: 64 oz (8 cups / 2000 ml)*\n"
            
            if water_ml > 0:
                progress = (water_oz / 64) * 100
                output += f"*Progress: {progress:.0f}% of recommended amount*\n"
            
            return text_response(output)
            
        except Exception as e:
            return text_response(f"Error retrieving water intake: {str(e)}")
Behavior2/5

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

With no annotations provided, the description carries the full burden of behavioral disclosure. It states what the tool does but lacks critical information: whether this is a read-only operation, what permissions are required, how errors are handled, or what the return format looks like (e.g., numeric value, object structure). For a data retrieval tool with zero annotation coverage, this is a significant gap.

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

Conciseness5/5

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

The description is perfectly concise and well-structured: a clear purpose statement followed by parameter details in a formatted 'Args' section. Every sentence earns its place with no wasted words, making it easy to parse and understand quickly.

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 low complexity (single optional parameter) and lack of annotations/output schema, the description is minimally adequate. It covers the basic purpose and parameter format but misses behavioral context and sibling tool differentiation. For a simple read operation, this might suffice, but it doesn't provide complete guidance for reliable agent use.

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?

The description adds meaningful context for the single parameter 'date', specifying the expected format (YYYY-MM-DD) and default behavior (today), which compensates for the 0% schema description coverage. However, it doesn't explain edge cases like invalid dates or timezone handling, leaving some semantic gaps.

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 tool's purpose with a specific verb ('Get') and resource ('water consumption for a specific day'), making it immediately understandable. However, it doesn't explicitly differentiate from sibling tools like 'get_daily_summary' or 'get_date_range_summary', which might also provide water intake data in different contexts.

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 sibling tools like 'get_daily_summary' (which might include water intake) or 'get_date_range_summary' (which could provide aggregated data), leaving the agent to infer usage context without explicit direction.

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/ai-mcp-garage/mcp-myfitnesspal'

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