Skip to main content
Glama

Log a saved meal

log_saved_meal
Idempotent

Log one of the user's saved meals in one go ('my usual breakfast', 'the post-run shake'). Give its name as the user says it (or its id): it is matched to their saved meals, and when no single one matches nothing is logged and the saved meals are listed so you can ask. portion scales every item (0.5 = half, 2 = double). meal_type is optional: when the user didn't say, Heza picks it from the local time eaten. Returns the logged entries (ids for update_food_log / delete_food_log) and the day's totals vs goals. Use idempotency_key so retries don't create duplicates.

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

Input Schema

NameRequiredDescriptionDefault
dateNoLocal date YYYY-MM-DD (or 'today'/'yesterday'). Defaults to today in the user's timezone.
mealYesSaved meal name as the user says it, or its id (from get_saved_meals)
portionNoMultiplier for the whole meal (default 1)
logged_atNoWhen it was eaten: HH:MM (local) or ISO datetime. Defaults to now (or noon for past dates).
meal_typeNoOmit when the user didn't say: picked from the local time eaten
idempotency_keyNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A4.7/5.0
Behavior5/5

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

Adds substantial behavior beyond the annotations: describes the matching rule and the failure mode (no single match → nothing logged, saved meals returned so the agent can ask), plus what is returned (entry ids for update_food_log/delete_food_log, day totals vs goals). The retry/idempotency guidance complements idempotentHint=true with actionable instructions.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Front-loaded with the core action, then matching behavior, then parameter notes, then side effects and return value. Every sentence carries operational information; nothing is padding.

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 6-parameter write tool with no output schema, the description covers the resolution logic, failure branch, side effects, retry safety, and return payload. An agent can invoke it correctly and handle the ambiguous-match case without further documentation.

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 coverage is already high at 83%, yet the description still adds meaning: how 'meal' is resolved (name as spoken or id, fuzzy-matched), and concrete scaling examples for 'portion' (0.5 = half, 2 = double) that go beyond the schema's 'Multiplier for the whole meal'. Meal_type behavior repeats what the schema already says, so it is not fully additive.

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?

States a specific verb and resource with scope: 'Log one of the user's saved meals in one go', with colloqual examples ('my usual breakfast'). The 'saved meal' framing plus the reference to get_saved_meals for ids clearly separates it from the granular log_food and from save_meal.

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?

Gives clear usage context: call it when the user names a saved meal, omit meal_type when the user didn't say it, and use idempotency_key on retries. It does not explicitly exclude alternatives (e.g. log_food for non-saved items), so the routing decision is implied rather than spelled out.

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