Skip to main content
Glama

Open pack

open_pack
Destructive

Record that the user opened a pack (tub, loaf, jar) of a saved food, so what is left of it is counted from the portions logged since; correct what is left of the open pack; or stop counting. Returns the pack size, grams used and grams left.

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": {
      "food": "<food>"
    },
    "name": "open_pack"
  }
}

Input Schema

NameRequiredDescriptionDefault
foodYesA saved food's id or name
stopNotrue to stop counting packs for this food
left_gNoGrams left in the pack now. With pack_g: a pack already partly used before counting began. Without pack_g: corrects the open pack (after weighing it), keeping its size, opening day and entries
pack_gNoNet weight of the pack in grams, from its label
opened_onNoThe day it was opened. Default today

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

B3.4/5.0
Behavior3/5

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

Annotations already declare destructiveHint=true and idempotentHint=false, so the safety profile is known. The description adds real value by explaining the counting model (remaining amount is derived from portions logged since opening) and by stating the return payload ('pack size, grams used and grams left') for a tool with no output schema. It does not warn that a call overwrites existing pack state or what happens if a pack is already open, which is the key behavioral risk for a destructive call.

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?

Front-loaded with the primary action and the parenthetical pack examples are compact and useful. The single semicolon-chained sentence carrying three distinct modes is dense and would read better as separate clauses, but no words are wasted.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a destructive, non-idempotent mutation with no output schema, the description covers the state model and the return values, which are the two hardest things to infer. It still leaves gaps an agent would want: the effect of calling it when a pack is already open, whether prior corrections are lost, and any failure conditions on the food identifier.

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 coverage is 100%, so every parameter — including the interaction between left_g with and without pack_g, and the opened_on default — is already documented in the schema. The description adds only the conceptual framing of pack types ('tub, loaf, jar') and the portions-logged derivation; it does not clarify the left_g/pack_g interaction in its own text. Baseline 3 applies.

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 uses a specific verb+resource pair ('Record that the user opened a pack ... of a saved food') and enumerates the three operations the tool performs: start counting, correct what is left, and stop counting. It is easy to distinguish from log_food or save_food on behavior grounds, though it never names a sibling to contrast against.

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?

The three modes ('record ... / correct ... / stop counting') map implicitly to the stop and left_g parameters, so an agent can infer which case applies. However there is no explicit when-to-use framing, no statement about what to do when no pack is currently open, and no pointer to the sibling (log_food) that consumes the counted portions.

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