Skip to main content
Glama

coffee-habit-cost-calculator

Read-onlyIdempotent

Compare the total nominal cost of a recurring coffee habit (drink price × times per week × years) against what the same weekly amount would have grown to if invested at a given annual return. Returns total spent, invested future value, and the opportunity-cost gap. The goal is to make compounding visible — not to moralize about coffee.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
drinkYesDrink preset. 'latte' (~$5.75), 'cappuccino' (~$5.25), 'drip-coffee' (~$3.25), 'cold-brew' (~$5.50), or 'custom' to provide custom_price.
yearsYesHorizon in years over which the habit continues. Decimals allowed (e.g. 30 for a working career, 10 for a decade).
custom_priceNoRequired when drink='custom'. Price per drink in dollars (e.g. 4.50). Ignored for presets.
times_per_weekYesHow many drinks per week. Fractional is allowed (e.g. 5 weekdays, or 2.5 for an every-other-day habit).
annual_return_percentYesExpected nominal annual return on the alternative investment, as a percentage (e.g. 7 for 7%). 7% real or 10% nominal are common long-term US stock-market assumptions.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
drink_priceYesResolved price per drink (preset or custom).
total_spentYesTotal nominal dollars spent on coffee over the horizon.
total_weeksYesNumber of weekly contributions / drinks (years × 52, rounded to integer).
annual_spendYesweekly_spend × 52.
weekly_spendYesdrink_price × times_per_week.
invested_valueYesFuture value of investing the same weekly amount at annual_return_percent over the horizon (end-of-week contributions).
opportunity_costYesinvested_value − total_spent. Positive when the investment outgrows the cash spent (typical with positive return).

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A4.5/5.0
Behavior4/5

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

Annotations already declare readOnlyHint, idempotentHint, and non-destructive behavior, so the description adds complementary detail: it is a pure calculation returning three specific values (total spent, invested future value, opportunity-cost gap). The 'not to moralize' note clarifies tone, but no mention of compounding frequency or nominal/real assumptions, though these are not required given the annotations.

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?

Three sentences, each earning its place: first defines the comparison, second lists outputs, third gives intent. No redundant phrasing or restating of the tool name.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

With an output schema present and annotations covering safety, the description fully covers purpose, calculation logic, and return contents. The tool is simple enough that no further detail about return structure or side effects is needed; nothing is missing.

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?

Schema description coverage is 100%, so the schema already documents all five parameters. The description adds value by giving the calculation formula ('drink price × times per week × years') and clarifying that the alternative investment is 'at a given annual return,' which maps directly to annual_return_percent without repeating the schema.

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 clearly states a specific comparative verb ('Compare') and resource ('total nominal cost of a recurring coffee habit' vs. invested value), making the tool's purpose unmistakable. It also distinguishes itself from the sibling tool coffee-ratio-calculator by focusing on opportunity cost rather than brewing ratios.

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 description implies when to use it (whenever the user wants to see the opportunity cost of coffee spending vs. investing) and adds context ('make compounding visible, not to moralize'). It does not explicitly list alternatives or exclusions, but the scope is clear enough for an AI to select it among sibling calculator tools.

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