Skip to main content
Glama

Set how often a category comes

upsert_category_frequency_rule
Idempotent

Set how many times a week a meal category should be on the plan, at least and at most. A rule about the same thing is changed, not added twice. Soft unless the household says it must hold.

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": {
      "category": "<category>",
      "minimumPerWeek": "<minimumPerWeek>",
      "maximumPerWeek": "<maximumPerWeek>",
      "strength": "<strength>"
    },
    "name": "upsert_category_frequency_rule"
  }
}

Input Schema

NameRequiredDescriptionDefault
categoryYesThe meal category.
strengthYesSoft unless the household says the rule must hold. Hard ONLY when the words are must/never/always (må/aldri/alltid/skal/kan ikke/ikke lov). Everything else is Soft — a preference the planner may bend on a tight week — including a bare statement said in passing («Taco på fredager», «Fisk to ganger i uka», «Maks 30 minutter på hverdager») and helst/gjerne/prøv. «Maks», «minst» and a number name the limit, not its strength: they do not make a rule Hard.
maximumPerWeekYesMaximum dinners per week.
minimumPerWeekYesMinimum dinners per week.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A3.7/5.0
Behavior4/5

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

Annotations already declare readOnlyHint=false, idempotentHint=true and destructiveHint=false, so the mutation/idempotency profile is partly covered. The description still adds value by spelling out the overwrite behavior in plain terms ('changed, not added twice') and by stating the default strength posture ('Soft unless the household says it must hold'), which tells the agent how a rule will be treated at planning time. It does not say what happens to a previously stored rule with a different bound, nor what the call returns.

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?

Three short sentences, front-loaded with the core action, followed by the upsert and strength caveats — no filler. The final sentence is elliptical ('the household says it must hold') but still readable in context.

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?

For a four-parameter, fully required, fully documented mutation with no output schema, the description plus annotations plus schema give an agent enough to call it correctly, including the soft/hard default. The remaining gap is the outcome of an overwrite and any validation rules on the min/max pair.

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%, including a very detailed enum explanation for 'strength', so the schema already carries most semantic weight and a baseline of 3 applies. The description restates the min/max meaning ('at least and at most') but adds no format, ordering, or constraint detail beyond the schema (e.g. what happens when minimumPerWeek exceeds maximumPerWeek).

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 states a specific verb and resource — setting how many times per week a meal category appears on the plan, with both a lower and upper bound. It also clarifies the upsert semantics ('A rule about the same thing is changed, not added twice'), which differentiates it from add-style siblings. It does not name the closely related siblings (upsert_category_on_day_rule, upsert_category_excluded_days_rule), so the differentiation is implicit rather than explicit.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

There is no explicit when-to-use or when-not-to-use guidance, and no sibling is named as an alternative. The reader can infer usage from 'at least and at most' and from the repeated-write note, but choosing between this and the day-specific or excluded-days rule tools is left to inference.

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