Skip to main content
Glama

set_shelf_life

Set how many days an item stays usable so HomeStock can flag it before it spoils; optionally note pantry, fridge, or freezer storage to explain the estimate.

Instructions

Teach HomeStock how long an item keeps, so it can be flagged before it rots. The agent supplies a sensible default on first purchase (fresh chicken ~3 days, milk ~7); the user overrides it. storage is one of pantry/fridge/freezer and is advisory — it explains the number.

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": {
      "item": "<item>",
      "days": "<days>"
    },
    "name": "set_shelf_life"
  }
}

Input Schema

NameRequiredDescriptionDefault
daysYes
itemYes
storageNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv0.2.0

TDQS

A3.7/5.0
Behavior3/5

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

With no annotations, the description carries the behavioral burden and does disclose the intended effect of flagging items before rot, plus that storage is advisory. However, it does not clarify overwrite behavior, persistence details, validation, or what happens if the item already has a shelf life.

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 three tightly written sentences with no wasted wording. It front-loads the purpose, then adds usage context and storage semantics in a logical order.

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 simple three-parameter mutation tool with no output schema, the description covers purpose, default/override usage, and storage values. It still omits item identity resolution and overwrite semantics, which are important for correct invocation.

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 0%, so the description must compensate. It explains days through examples and fully explains storage as one of pantry/fridge/freezer and advisory, but it does not clarify the item identifier format or whether aliases are accepted.

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: teaching HomeStock how long an item keeps, with the effect that it can be flagged before it rots. It is clear what the tool does, though it does not explicitly distinguish itself from siblings such as add_items or get_expiring_soon.

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?

It gives clear usage context: the agent should supply a sensible default on first purchase, and the user can override it. It does not name alternatives or state when not to use this tool, so it stops short of full when/when-not guidance.

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