Skip to main content
Glama

add_pantry_item

Idempotent

Add a food to the user's pantry, or UPDATE it if it's already there (matched by name, any casing) — e.g. 'add rolled oats to my pantry'. Only name is required; include macros (for one serving), a serving label, a source, and a short note when you know them, so a later log can reuse them. Re-adding the same food REPLACES its details (an upsert — it never creates a duplicate). Only pass a source you actually got from search_foods/lookup_barcode; an unrecognized value is recorded as the user's own estimate ('client'). This does NOT log a meal — it only curates the user's staples.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
nameYesThe food to keep on hand, e.g. 'rolled oats'.
noteNoOptional short note, e.g. 'the Costco tub'.
macrosNoMacros for ONE serving of this food, when known.
sourceNoWhere the macros came from, if grounded via search_foods/lookup_barcode (e.g. 'usda'). Defaults to your own estimate ('client'); unrecognized values are recorded as 'client'.
servingNoServing label the macros are for, e.g. '1 cup' or 'per 100 g'.

TDQS

A4.9/5.0
Behavior5/5

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

Beyond annotations (idempotentHint, readOnlyHint false), the description discloses key behaviors: re-adding is an upsert that REPLACES details and never creates duplicates, unrecognized source values are recorded as 'client', and the tool only curates staples. These are non-obvious side effects and important operational details that annotations alone do not capture.

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 description is dense but each sentence serves a specific purpose: core functionality, optional parameters, upsert semantics, source validation, and exclusion of meal logging. It is front-loaded with the main verb and resource, and no word is wasted despite the amount of behavioral detail.

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?

Given a 5-parameter tool with a nested macros object and no output schema, the description covers all essential aspects: what it does, when to use it, parameter behaviors, edge cases (duplicates, invalid source), and what it does NOT do. An agent has enough context to invoke it correctly without ambiguity.

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% and each parameter has a clear schema description, so the baseline is 3. The description adds valuable semantics beyond the schema: matching by name/case-insensitivity, macros are for one serving, the source must come from specific tools, and unrecognized source values degrade to 'client'.

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 uses a specific verb ('Add' / 'UPDATE') and clearly identifies the resource (a food in the user's pantry), including an upsert behavior matching by name regardless of casing. It also differentiates from siblings by explicitly stating it does not log a meal and from remove_pantry_item by describing the add/update action.

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?

Provides explicit guidance on when to use the tool (e.g., 'add rolled oats to my pantry'), what is required ('Only name is required'), and what to include when known (macros, serving, source, note). It also states when not to use it ('This does NOT log a meal') and constrains the source parameter to values obtained from search_foods/lookup_barcode, effectively distinguishing it from logging and search alternatives.

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.

TDQS

A4.5/5.0
Disambiguation5/5

Each tool targets a distinct resource and action: pantry vs diary vs food search vs preferences vs diagnostics. Even similar tools like get_day/get_range are clearly differentiated by scope, and search_foods/lookup_barcode are distinguished by input type (text vs barcode).

Naming Consistency5/5

All tools follow a consistent verb_noun pattern with lowercase snake_case (add_pantry_item, get_day, log_meal, search_foods). The only exception is whoami, which is a standard diagnostic convention and does not disrupt the overall consistency.

Tool Count5/5

With 12 tools, the server is well-scoped for its food-tracking domain. Each tool covers a necessary function (pantry CRUD, diary CRUD, food search, preferences, diagnostics) without redundancy or bloat.

Completeness5/5

The tool set provides full lifecycle coverage for the core domain: pantry items can be added, read, and removed (upsert covers update); diary entries can be created, read (single/day/range), updated, and deleted; food lookup includes text search and barcode; and preferences are accessible. No obvious gaps hinder agent workflows.

Resources