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 — the coffee's current bag by default, or the bag named.

Input Schema

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

Output Schema

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

Schema Changelog

Changes observed during successful MCP inspections.

  1. 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"
      +]
  2. 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"
      +}
  3. First observed

TDQS

A4.1/5.0
Behavior4/5

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

Annotations already establish a safe, read-only, idempotent, closed-world operation, so the bar is low. The description adds real substance: exactly what is computed (days off roast) and the verdict categories (resting/staling), plus the defaulting rule for bag selection. Return shape is covered by the output schema.

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?

A single dense sentence that front-loads the computed output before the defaulting clause. The em-dash construction is slightly awkward but nothing is wasted.

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?

With annotations carrying the safety profile and an output schema carrying return values, the description only needs to explain inputs and intent. It handles the bag defaulting well but leaves the required bean_id entirely unexplained, a minor but real gap.

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 50%: bag_id is already documented in the schema, and the description usefully reinforces the null-means-current-bag default. However, bean_id is required yet described nowhere in either the schema or the description, so the gap is only partially compensated.

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?

States a specific verb (compute) and resource (a bag's age in days off roast) plus the derived output (resting/staling verdict). No sibling tool overlaps with this function, so the agent can distinguish it immediately.

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?

Explicitly states the default resolution: 'the coffee's current bag by default, or the bag named.' That tells the agent when the optional bag_id matters. It stops short of naming an alternative tool or exclusions, but no sibling competes for this job.

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