Skip to content
This repository was archived by the owner on May 27, 2026. It is now read-only.
This repository was archived by the owner on May 27, 2026. It is now read-only.

get_meal_plan does not return the days requested #64

@miguelangel-nubla

Description

@miguelangel-nubla

Hi, thank you for your work on this.

I am having a issue with the mealplan calls, the limit parameter limits the number of entries returned, not the days.

mcp-grocy-api/src/index.ts

Lines 1136 to 1137 in 3c3aa37

const days = request.params.arguments?.days || 7;
return await this.handleGrocyApiCall(`/objects/meal_plan?query%5B%5D=day%3E%3D${startDate}&limit=${days}`, 'Get meal plan');

so:

{
  "startDate": "2025-08-11",
  "days": 7
}

does not return the whole week if there are more than 7 entries on the mealplan for the week.

I have not made a PR since I am not sure if removing the limit parameter entirely is a good idea for a sane default.

The alternative of exposing the limit parameter with a large default might also be problematic in the instance the user asks for a montly mealplan for example. For that to work in my usecase it would need a limit of 3 meals minimum a day for 30 days so 90 entires limit. That would be a issue for calls that only need a day or week.

Maybe a better middle ground would be to replace the whole get_meal_plan call with get_weekly_meal_plan with a large limit such as 100. That would work with all common use cases and allow the ai to understand to call multiple times if needed.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions