Skip to main content
Glama

metri: Calorie & Macro Tracker

Read food diary

metri_get_diary
Read-onlyIdempotent

Retrieve the user's diary for whole calendar days, newest entries first. Days are counted in the time zone metri keeps for the user's account, so pass the user's own dates: today, yesterday or this week become a first and a last day. The period may span at most 31 days; split longer periods into consecutive ones. Each entry's consumedAt is local time in that zone, with its UTC offset. Each entry lists its items; an item's grams is the logged amount (a batch item carries fractionOfBatch, plus grams when logged in grams), and serving is how the user counted it (for example 2 cups), so count servings from it rather than from grams. Totals are computed on the server over the whole period regardless of pagination, so use them instead of adding up entries. With query, only entries whose name or any item's food name contains the text are returned, each with all its items; totals then count every item of an entry whose name matches and, in other entries, only the items whose food name matches. Matching is a case-insensitive substring with no synonyms or translation: query each name the user may have logged a food under.

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": {
      "from": "<from>",
      "to": "<to>"
    },
    "name": "metri_get_diary"
  }
}

Input Schema

NameRequiredDescriptionDefault
toYesLast day of the period, included, as YYYY-MM-DD. The same as from for a single day.
fromYesFirst day of the period, as YYYY-MM-DD.
queryNoCase-insensitive substring of an entry name or food name, such as coffee. Narrows both the entries and the totals.
cursorNonextCursor from the previous response, to get the next page. Send it with the same from, to and query.

Output Schema

NameRequiredDescriptionDefault
totalsYes
nextCursorNo
consumptionsYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.3/5.0
Behavior5/5

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

Annotations already declare readOnly/idempotent/non-destructive, but the description adds substantial behavior beyond them: a hard 31-day cap with a splitting strategy, account-level time-zone interpretation of dates, consumedAt values carrying a UTC offset, and the fact that totals are computed server-side over the whole period regardless of pagination. It also discloses that query filtering changes what totals count, which is a non-obvious behavioral trap.

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?

Purpose is front-loaded and every sentence carries operational information, but it is delivered as one dense run-on block covering date semantics, pagination, item fields and query matching, which makes it harder to scan than a segmented structure would be.

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 read tool with four parameters, full schema coverage and an output schema, this is complete: it covers date interpretation, the period limit, pagination behavior, how entries/items/servings should be read, and the exact matching rules for query. Nothing an agent needs to call it correctly or interpret results is left unstated.

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?

With 100% schema coverage the baseline is 3, and the description earns above that by adding meaning the schema lacks: cursor must be resent with the same from/to/query, and query is a case-insensitive substring over entry names and item food names with no synonyms or translation, narrowing totals as well as entries. The grams/fractionOfBatch/serving explanation also clarifies how to interpret fields rather than trusting raw amounts.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description opens with a specific verb and resource ('Retrieve the user's diary for whole calendar days, newest entries first'), which tells an agent exactly what is returned and in what order. It distinguishes itself implicitly through the whole-day/date-range scoping, though it never names the overlapping siblings (metri_today_details, metri_show_today) that a reading agent must choose between.

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?

Clear context is given for how to call it: pass the user's own local dates, split periods longer than 31 days into consecutive calls, and issue one query per name variant the user may have used. What is missing is explicit routing guidance versus the sibling tools that also surface diary/today data.

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