Skip to main content
Glama
AdamWalt

MyFitnessPal MCP Server

by AdamWalt

mfp_add_food_to_diary

Add food to your MyFitnessPal diary for any meal and date. Provide the food ID, meal, date, and quantity to log your nutrition entry.

Instructions

Add a food item to your MyFitnessPal food diary for a specific date and meal.

This tool adds a food entry to your diary. You can search for foods using
mfp_search_food to find the food ID (mfp_id) needed for this tool.

Args:
    params: AddFoodToDiaryInput containing:
        - mfp_id (str): MyFitnessPal food item ID (from mfp_search_food)
        - meal (str): Meal name - 'Breakfast', 'Lunch', 'Dinner', or 'Snacks' (default: 'Breakfast')
        - date (str, optional): Date in YYYY-MM-DD format, defaults to today
        - quantity (float): Number of servings (default: 1.0)
        - unit (str, optional): Unit/serving size (e.g., '1 cup', '100g')

Returns:
    str: Confirmation message with details of the added food entry

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
paramsYes

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes
Behavior3/5

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

Annotations already indicate a write operation (readOnlyHint=false) and non-destructive behavior. Description adds that it returns a confirmation string and depends on a prior search, but does not disclose side effects like potential duplicates or required authentication. This is adequate but not rich.

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?

Well-structured with Args and Returns sections, front-loaded with the main purpose. The first two sentences are slightly redundant ('Add a food item...' and 'This tool adds a food entry...'), but the overall length is appropriate and easily scannable.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Covers how to obtain the required food ID, lists all parameters, and describes the return format. Combined with annotations and the output schema, the description gives enough context for correct invocation, though it could mention edge cases like duplicate entries or date handling.

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 description goes beyond the schema by enumerating meal options ('Breakfast', 'Lunch', 'Dinner', or 'Snacks'), providing date format examples, unit examples, and explaining that mfp_id comes from mfp_search_food. This helps the agent select correct values even if schema descriptions are minimal.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

Description clearly states 'Add a food item to your MyFitnessPal food diary for a specific date and meal,' using a specific verb and resource. It distinguishes from siblings like mfp_get_diary (read) and mfp_remove_food_from_diary (delete), making the tool's purpose unambiguous.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Explicitly points to prerequisite workflow: 'You can search for foods using mfp_search_food to find the food ID (mfp_id) needed for this tool.' This provides clear context for when to use the tool, though it does not mention alternatives or exclusions beyond this.

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/AdamWalt/myfitnesspal-mcp-python'

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