Skip to main content
Glama

Save a meal

save_meal
DestructiveIdempotent

Keep a meal the user eats often as a saved meal, so next time it is one line ('log my usual breakfast' -> log_saved_meal). Give its items in ONE of three ways: items (name, portion and nutrients for one meal, as in log_food), entry_ids (food entries already logged, from log_food or get_food_log: saved as they were logged), or date + meal_type (everything logged in that meal that day). Saving with the name of an existing saved meal replaces its items: confirm with the user first. It shows under Saved meals on the Fuel screen, where it can be edited or deleted. This saves the meal; it does not log it.

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": {
      "name": "<name>"
    },
    "name": "save_meal"
  }
}

Input Schema

NameRequiredDescriptionDefault
dateNoLocal date YYYY-MM-DD (or 'today'/'yesterday'). Defaults to today in the user's timezone.
nameYesWhat the user calls it, e.g. 'Usual breakfast', 'Post-run shake'
itemsNo
entry_idsNoFood log entry ids to save as one meal
meal_typeNoWith date: save everything logged in this meal that day

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A4.6/5.0
Behavior4/5

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

Annotations already flag destructiveHint=true and idempotentHint=true; the description adds the concrete reason why it is destructive (saving under an existing name replaces its items) and prescribes a confirm-with-user step, plus where the result appears in the UI. It does not say what the call returns or how name matching is performed, small residual gaps given the 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?

Front-loaded with purpose, then the three-mode rule, then the overwrite warning, then the scope disclaimer. Dense but every sentence carries information; the parenthetical UI example is the only mildly expendable clause.

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?

For a five-parameter create tool with no output schema, the definition covers input modes, overwrite semantics, and a confirmation requirement. It leaves the return value and any name-collision details implicit, which an agent can infer but not confirm.

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?

Schema coverage is 80%, but the description adds the crucial structural constraint the schema cannot express: items, entry_ids, and date + meal_type are alternatives, one of three, and it clarifies that entry_ids are 'saved as they were logged' while date + meal_type captures everything logged in that meal that day.

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 first sentence specifies the verb (keep/save) and the resource (a meal template), and distinguishes it from logging by naming the sibling that consumes it ('log my usual breakfast' -> log_saved_meal). The closing sentence reinforces the boundary: 'This saves the meal; it does not log it.'

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?

Gives an explicit when-to-use framing (meals eaten often, so next time it is one line) and enumerates three mutually exclusive input routes with their sources (items as in log_food, entry_ids from log_food or get_food_log, date + meal_type from the log). It also states the overwrite case and requires user confirmation before proceeding.

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.

Resources