Skip to main content
Glama

Get Diary

get_diary
Read-only

The user's food diary for a date range: what they logged per meal, nutrient totals per day, goal progress and notes.

nutrients names each nutrient code once, with its unit and the user's target. days[].totals holds only non-zero values by code. is_limit means the target is a maximum, not something to reach.

Totals cover the nutrients the user tracks. Pass codes to get specific nutrients instead, which also keeps long ranges small.

detail: "summary" (up to 31 days) or "meals", which adds nutrient totals per meal (up to 7 days).

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": {
      "start_date": "<start_date>",
      "end_date": "<end_date>"
    },
    "name": "get_diary"
  }
}

Input Schema

NameRequiredDescriptionDefault
codesNoOnly these nutrient codes, from list_components.
detailNoHow much to return per day.summary
end_dateYesLast day, YYYY-MM-DD.
start_dateYesFirst day, YYYY-MM-DD.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.6/5.0
Behavior5/5

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

Annotations only establish that this is a safe read. The description adds behavior the agent cannot otherwise know: `days[].totals` contains only non-zero values, `is_limit` means a maximum rather than a target, totals are limited to tracked nutrients, and the two detail modes have different day caps.

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?

The scope comes first, then response-shape quirks, then parameter guidance. The three paragraphs have no filler and each sentence conveys a distinct fact.

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?

There is no output schema, so the description has to explain the response, and it does: it names the top-level pieces (`nutrients`, `days[].totals`, `is_limit`, notes) and two important quirks. The full shape of nested day and meal objects is not described in detail, which is the only reason it does not score 5.

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 100%, so the baseline would be 3, but the description adds real meaning. It explains the practical effect of `codes` (smaller responses over long ranges) and gives the day caps per `detail` mode, which appear nowhere in the schema.

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 line states a specific verb and resource ('the user's food diary for a date range') plus what it contains: per-meal logs, daily nutrient totals, goal progress, notes. That scope is distinguishable from sibling mutations like recalculate_diary_day and remove_diary_entry.

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?

It gives practical selection guidance: 'Pass `codes` to get specific nutrients instead, which also keeps long ranges small,' and the `detail` sentence says which mode to pick and its day caps. It does not name alternatives such as get_nutrient_stats or get_nutrient_contributions, so it falls short of explicit when-not-to-use routing.

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