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. Changed2 schema fields changed
    • removedOutput schema / properties / days_since_opened / type
      Removed value: -"null"
    • removedOutput schema / properties / grams_remaining / type
      Removed value: -"null"
  2. 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"
      +]
  3. 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"
      +}
  4. First observed

TDQS

A3.7/5.0
Behavior3/5

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

Annotations already establish readOnlyHint=true, idempotentHint=true, destructiveHint=false, and openWorldHint=false, so the safety profile is fully carried by structured data. The description adds the substantive behavior (off-roast day count and a resting/staling verdict) but says nothing about failure modes or edge cases, so it only modestly exceeds the annotation baseline.

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 front-loaded sentence with no padding; the output and the default-scope clause come in the right order. The trailing em-dash clause is slightly compressed but still readable.

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?

An output schema exists, so return structure need not be explained, and annotations cover the safety envelope. What remains thin is the undocumented required bean_id, but for a two-parameter read-only computation the description is nearly complete.

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 documented in-schema and its null default is reinforced by the description's 'current bag by default' phrasing, but bean_id has no description anywhere. The description helps for one parameter and leaves the required one 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?

States a specific verb+resource ('Compute a bag's age in days off roast') plus the secondary output ('resting/staling verdict'), which no sibling tool provides. An agent can distinguish this from list_beans, register_bag, or update_bag at a glance.

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 description implies scope ('the coffee's current bag by default, or the bag named'), which guides the caller, but it never states when to reach for this tool versus alternatives or any prerequisite. Usage is inferable rather than explicit.

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