Skip to main content
Glama

Compute coffee age

compute_age
Read-onlyIdempotent

Compute a bag's age in days off roast and its resting/staling verdict, for the coffee's current bag by default or for the bag named.

Input Schema

NameRequiredDescriptionDefault
bag_idNoA bag of that coffee (from list_beans' bags[]); null = its current bag
bean_idYes

Output Schema

NameRequiredDescriptionDefault
bag_idYes
bean_idYes
verdictYes
age_daysYes
warningsYes
roast_dateYes
rest_windowYes
verdict_codeYes
days_off_roastYes
grams_remainingYes
days_since_openedYes
effective_age_daysYes
frozen_days_excludedYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changed
    • addedOutput schema / properties / verdict_code
      Added value: +{
      +  "type": "string"
      +}
    • changedOutput schema / required
      Previous value: -[
      -  "bean_id",
      -  "bag_id",
      -  "roast_date",
      -  "age_days",
      -  "days_off_roast",
      -  "days_since_opened",
      -  "frozen_days_excluded",
      -  "effective_age_days",
      -  "rest_window",
      -  "verdict",
      -  "grams_remaining",
      -  "warnings"
      -]New value: +[
      +  "bean_id",
      +  "bag_id",
      +  "roast_date",
      +  "age_days",
      +  "days_off_roast",
      +  "days_since_opened",
      +  "frozen_days_excluded",
      +  "effective_age_days",
      +  "rest_window",
      +  "verdict",
      +  "verdict_code",
      +  "grams_remaining",
      +  "warnings"
      +]
  2. Changed2 schema fields changed
    • removedOutput schema / properties / days_since_opened / type
      Removed value: -"null"
    • removedOutput schema / properties / grams_remaining / type
      Removed value: -"null"
  3. Changed3 schema fields changed
    • addedInput schema / properties / bag_id
      Added value: +{
      +  "description": "A bag of that coffee (from list_beans' bags[]); null = its current bag",
      +  "type": [
      +    "integer",
      +    "null"
      +  ]
      +}
    • addedOutput schema / properties / bag_id
      Added value: +{
      +  "type": "integer"
      +}
    • changedOutput schema / required
      Previous value: -[
      -  "bean_id",
      -  "roast_date",
      -  "age_days",
      -  "days_off_roast",
      -  "days_since_opened",
      -  "frozen_days_excluded",
      -  "effective_age_days",
      -  "rest_window",
      -  "verdict",
      -  "grams_remaining",
      -  "warnings"
      -]New value: +[
      +  "bean_id",
      +  "bag_id",
      +  "roast_date",
      +  "age_days",
      +  "days_off_roast",
      +  "days_since_opened",
      +  "frozen_days_excluded",
      +  "effective_age_days",
      +  "rest_window",
      +  "verdict",
      +  "grams_remaining",
      +  "warnings"
      +]
  4. Changed1 schema field changed
    • changedOutput schema / (root)
      Previous value: -nullNew value: +{
      +  "additionalProperties": true,
      +  "properties": {
      +    "age_days": {
      +      "type": "integer"
      +    },
      +    "bean_id": {
      +      "type": "integer"
      +    },
      +    "days_off_roast": {
      +      "type": "integer"
      +    },
      +    "days_since_opened": {
      +      "type": "null"
      +    },
      +    "effective_age_days": {
      +      "type": "integer"
      +    },
      +    "frozen_days_excluded": {
      +      "type": "integer"
      +    },
      +    "grams_remaining": {
      +      "type": "null"
      +    },
      +    "rest_window": {
      +      "type": "string"
      +    },
      +    "roast_date": {
      +      "type": "string"
      +    },
      +    "verdict": {
      +      "type": "string"
      +    },
      +    "warnings": {
      +      "type": "array"
      +    }
      +  },
      +  "required": [
      +    "bean_id",
      +    "roast_date",
      +    "age_days",
      +    "days_off_roast",
      +    "days_since_opened",
      +    "frozen_days_excluded",
      +    "effective_age_days",
      +    "rest_window",
      +    "verdict",
      +    "grams_remaining",
      +    "warnings"
      +  ],
      +  "type": "object"
      +}
  5. First observed

TDQS

A4.2/5.0
Behavior4/5

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

Annotations already declare that this is a read-only, idempotent, non-destructive, closed-world operation. The description adds useful behavioral context by explaining that it computes age off roast and a resting/staling verdict, and that it resolves to the current bag unless a bag is specified.

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 a single front-loaded sentence with no filler. Every clause contributes either the computation performed, the verdict returned, or the bag-selection behavior.

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?

The tool is simple, an output schema exists, and annotations cover its safety profile, so the description does not need to explain return values or side effects. It is nearly complete, with only minor room to clarify the required bean_id parameter.

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 50%: bag_id is documented in the schema, but bean_id has no schema description. The description partially compensates by implying bean_id identifies the coffee and clarifying that bag_id defaults to the current bag, but it does not explicitly explain the required bean_id parameter or its role.

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?

The description uses a specific verb and resource: it computes a bag's age in days off roast and its resting/staling verdict. It also distinguishes the default current-bag behavior from an explicitly named bag, so an agent can identify the tool's function without inspecting the schema.

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 operational context: use the coffee's current bag by default or target a named bag. It does not explicitly state when to prefer this tool over siblings, but no sibling provides an equivalent age/verdict computation, so the usage is sufficiently clear.

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