Skip to main content
Glama

create_diet_plan

Create a diet plan for a client (confirm-gated). To check whether one was already created — for example if asked "is it done?" — call list_diet_plans instead of calling this again; re-running this with confirm: true a second time for the same client and title returns the plan already on file rather than writing a duplicate. Prefer meals like { name, scheduledTime: 'HH:mm', order, days: [MONDAY..SUNDAY], section, calories, macros, description, ingredients }. description: one short sentence explaining why this meal is included — shown to the client under the meal. ingredients: REQUIRED on every meal — break each meal into its raw materials with real quantities — e.g. [{ name: 'Paneer', quantity: 60, unit: 'g', calories: 159, protein: 11, carbs: 2, fat: 13 }, { name: 'Cooking oil', quantity: 10, unit: 'ml', isCookingAddition: true, calories: 88, fat: 10 }]. A meal with only calories/macros and no ingredients is rejected. Always include the cooking fat (oil/ghee/butter) as its own ingredient — it is easy to forget and adds real calories. Use get_ingredient_nutrition for the numbers, and make the ingredient calories/macros sum roughly to the meal's calories/macros. Whatever itemised breakdown you show the coach in chat MUST be sent here as the ingredients array, or the client's saved plan will lose every quantity. Legacy slot values like BREAKFAST/LUNCH/DINNER/SNACK are accepted and auto-mapped.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "clientId": "<clientId>",
      "title": "<title>",
      "startDate": "<startDate>",
      "meals": "<meals>"
    },
    "name": "create_diet_plan"
  }
}

Input Schema

NameRequiredDescriptionDefault
mealsYes
titleYes
confirmNoMust be true to actually execute. If false/omitted, returns a preview only.
endDateNo
clientIdYes
startDateYesYYYY-MM-DD

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.8/5.0
Behavior5/5

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

Annotations already declare a non-read-only, non-destructive mutation. The description adds important behavior beyond annotations: confirm-gated execution, idempotent duplicate handling with confirm:true, validation rejection for meals without ingredients, and the requirement to persist itemized ingredients.

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 front-loaded with purpose and the key alternative before moving into meal structure. It is dense and long, but most sentences carry necessary operational detail for a complex nested create tool.

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 complex creation tool with no output schema and low schema description coverage, the description covers the critical call context: confirm gating, duplicate behavior, alternative lookup tool, required ingredient shape, nutrition source, cooking-fat inclusion, and legacy slot 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?

Schema description coverage is low, but the description compensates heavily for the complex meals parameter by explaining required ingredients, cooking-fat items, scheduledTime format, days, legacy slot mapping, and a concrete meal/ingredient shape. It does not add much for top-level clientId/startDate/endDate semantics beyond what the schema provides.

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 states a specific verb and resource: 'Create a diet plan for a client (confirm-gated).' It distinguishes this from checking existing plans by naming list_diet_plans and explaining when to use that sibling instead.

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?

It explicitly routes the agent: to check whether a plan was already created, call list_diet_plans instead of calling this again. It also names get_ingredient_nutrition for ingredient nutrition values, giving clear alternatives and prerequisites.

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.