Skip to main content
Glama

Add or remove a favourite

set_favorite
Idempotent

Add a catalog food to favorites or remove it with favorite false. Use food_id and food_type from food searches; safe to repeat.

Instructions

Add a catalog food to the user's favourites, or remove it with favorite false. food_id and food_type come from search_food, get_recent_foods or get_favorite_foods. Repeating it is safe. The server applies it asynchronously, so get_favorite_foods may not show the change for a moment. data.ok says the server accepted it.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
food_idYesfood_id of a search_food, search_recipes, find_by_barcode, get_recent_foods, get_favorite_foods or get_my_foods hit, create_food's food_id (PRODUCT), create_recipe's recipe_id (RECIPE), or a get_day row's product_id (PRODUCT) or recipe_id (RECIPE).
favoriteNofalse to remove it from the favourites.
food_typeYestype of that search hit, or the get_day row's food_type.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
okYes
dataNo
errorNodescribe_error() of what went wrong; docs/AGENTS.md, Results and errors.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.2/5.0
Behavior4/5

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

Annotations already declare idempotentHint=true, destructiveHint=false and readOnlyHint=false, so the safety profile is covered; the description nonetheless adds genuinely new context: the write is applied asynchronously, so get_favorite_foods may lag, and data.ok signals server acceptance. It does not mention auth/permission requirements, but the async and confirmation details are the more valuable disclosures here.

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?

Five short sentences, purpose front-loaded, each carrying distinct information (purpose, input provenance, idempotency, async latency, confirmation signal). Only the data.ok sentence is arguably redundant given an output schema exists.

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 3-parameter mutation with full schema coverage and an output schema, the description covers everything an agent needs: what it does, where inputs come from, that repeats are safe, and the asynchronous timing caveat that would otherwise cause a false 'it didn't work' conclusion.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100% and the schema already enumerates every source of food_id/food_type in detail, including the default of favorite and the PRODUCT/RECIPE enum. The description restates provenance rather than adding syntax or edge-case meaning beyond the schema, so the baseline 3 applies.

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 ('Add a catalog food to the user's favourites') plus the inverse operation ('remove it with favorite false'), so the tool's toggle nature is unambiguous. An agent can immediately distinguish it from the read-only sibling get_favorite_foods.

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 concrete provenance for its required inputs ('food_id and food_type come from search_food, get_recent_foods or get_favorite_foods'), which tells the agent when this tool is applicable. It does not, however, explicitly contrast itself with adjacent write tools such as add_food or add_custom_item, so routing guidance stops just short of exhaustive.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.