Skip to main content
Glama
delize

MyFitnessPal MCP Server

by delize

mfp_create_food

Create a custom food entry with nutrition per serving in MyFitnessPal, enabling logging when search finds no match. Specify macros and optional nutrients; private by default.

Instructions

Create a new custom food in the MyFitnessPal database (via the v2 API).

Use this when a food is not already in MyFitnessPal (mfp_search_food returns nothing suitable) and you want it available to log. All nutrition values are entered PER ONE serving_size (e.g. serving_size='125 g' with the numbers for a 125 g portion).

On success the new food's id is returned as mfp_id; pass it to mfp_add_food_to_diary to log the food (it may take a short moment to also surface in mfp_search_food). Calling this repeatedly creates duplicate foods.

IMPORTANT: share_public=True submits the food to MyFitnessPal's shared public database and is IRREVERSIBLE -- public foods can no longer be edited or deleted. Leave it False (default) to create a private food you can later delete.

Args: params: CreateFoodInput containing: - description (str): Food name (required) - brand (str, optional): Brand/manufacturer - calories, fat, carbs, protein (float): Core macros per serving (required) - saturated_fat, polyunsaturated_fat, monounsaturated_fat, trans_fat, fiber, sugar, sodium, potassium, cholesterol, vitamin_a, vitamin_c, calcium, iron (float, optional): Additional nutrients per serving - serving_size (str): Serving-size label, e.g. '1 Serving', '125 g' (default '1 Serving') - servings_per_container (float): Servings per container (default 1.0) - share_public (bool): Submit to the public database; irreversible (default False)

Returns: str: JSON confirmation including the new food's mfp_id

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
paramsYes

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections. Dates show when Glama detected each change.

  1. First observedv0.1.0

TDQS

A4.9/5.0
Behavior5/5

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

Although annotations already signal mutation and non-idempotence, the description adds essential behavioral context: the resulting mfp_id, the delay before appearing in search, duplicate creation on repeat calls, and the irreversible nature of share_public=True (public foods cannot be edited or deleted). No contradiction with annotations.

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 well structured, front-loaded with purpose and usage, and uses a clear Args list. It is somewhat long and partially repeats parameter information already available in the schema, but the length is justified by the many optional fields and important caveats.

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

Completeness5/5

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

For a create operation with many optional nutrients, the description covers what the agent needs: prerequisites, parameter semantics, defaults, return value (mfp_id), follow-up workflow (mfp_add_food_to_diary), duplicate behavior, and irreversible public submission. Nothing critical for invoking it correctly is missing.

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

Parameters5/5

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

With schema coverage reported at 0%, the description compensates by listing every parameter with required/optional status, defaults, and the critical rule that all nutrition values are 'PER ONE serving_size' (e.g., serving_size='125 g'). It also clarifies the irreversible meaning of share_public beyond the schema's boolean description.

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?

The description opens with a specific verb and resource: 'Create a new custom food in the MyFitnessPal database (via the v2 API).' It also distinguishes itself from nearby siblings by stating it is for foods where 'mfp_search_food returns nothing suitable' and connects the result to mfp_add_food_to_diary.

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

Usage Guidelines5/5

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

Explicit when-to-use guidance is present: 'Use this when a food is not already in MyFitnessPal (mfp_search_food returns nothing suitable) and you want it available to log.' It names the relevant sibling tools (mfp_search_food, mfp_add_food_to_diary) and warns against repeated calls creating duplicate foods.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

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/delize/myfitness-mcp'

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