Skip to main content
Glama

WritersLogic verifiable AI agents

shelf-life-check

Is this lot still within shelf life on a given date? (unopened and after-opening limits, minimum remaining days) — For up to 100 lots, computes the expiry date from manufacture/fill date + shelf life (days, weeks, months, years; month arithmetic clamps to month end) and from opened date + after-opening life, takes the earlier, and checks it against a caller asOf date and an optional minimum remaining days at receipt; flags a labelled expiry that disagrees with the computed one. The last day of life is the expi

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": {
      "asOf": "<asOf>",
      "items": "<items>"
    },
    "name": "shelf-life-check"
  }
}

Input Schema

NameRequiredDescriptionDefault
asOfYes
itemsYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4/5.0
Behavior3/5

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

No annotations exist, so the description carries the full burden, and it does disclose substantive rules: month arithmetic clamps to month end, the earlier of two computed expiries wins, minRemainingDays applies at receipt, and disagreements with a labelled expiry are flagged. However, the text is truncated mid-clause ('The last day of life is the expi'), losing the inclusive/exclusive boundary rule, and it never states the response shape or how lots are reported back.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness3/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The leading question is well front-loaded, but the body collapses into a single long run-on clause that chains five computations together, and the text terminates mid-sentence, which reads as an error rather than an ending. The density is earned, but the structure makes the rules harder to extract than they need to be.

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 complex multi-field calculator with no annotations and no output schema, the description supplies most of what an agent needs: inputs, unit handling, tie-breaking logic, and the anomaly flag. The truncated ending leaves the boundary convention and the result format under-specified, which is the main remaining gap.

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?

With 0% schema description coverage, the description must compensate, and it largely does: asOf is the comparison date, madeOn/openedOn anchor the two expiry computations, shelfLife units are enumerated (days, weeks, months, years), minRemainingDays is an optional threshold at receipt, and labelledExpiry is checked for disagreement. Only the id field and the exact interaction of missing dates are left implicit.

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?

Opens with a specific question that names the resource (lot shelf life) and the operative input (a given date), then states precisely what it computes: expiry from manufacture date plus shelf life, expiry from opened date plus after-opening life, the earlier of the two, and a comparison against asOf. This is a distinct verb+resource that separates it from the surrounding *-check siblings.

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?

The framing question establishes the decision context (is this lot still usable on this date) and the batch ceiling of 100 lots tells the agent the appropriate scale. There is no explicit when-not or named alternative, but the use case is unambiguous for an agent holding lot data.

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