Skip to main content
Glama

Senaro Personal Finance

Opportunity Cost Calculator

calculate_opportunity_cost
Read-onlyIdempotent

Calculation, not advice. Verify with a professional before acting. Calculate the true cost of recurring spending by showing what that money would be worth if invested. Pick this when the input is recurring spending. Pick calculate_compound_interest when the input is a balance and its contributions with no spending to price, and compare_payoff_vs_invest when the alternative to investing is paying down debt. The response includes chart_hints with rendering directives any client can use.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
labelNoWhat the spending is, e.g. 'coffee' or 'streaming subscriptions'. Optional. Max 120 characters.
yearsYesTime horizon in years. Integer, greater than 0. REQUIRED, no default.
chart_titleNoOverride for the chart title. Must not contain em-dashes or en-dashes. Max 120 characters. Optional.
tax_bracket_pctNoTax bracket as a percentage, applied as a flat haircut to the investment gain. Decimal from 0 to 100. Optional.
monthly_spendingYesMonthly spending to price against investing. Decimal, at least $0.01. The opportunity cost of spending $0 is degenerate and is rejected. REQUIRED, no default.
annual_return_pctYesEffective annual investment return, e.g. 8 not 0.08; the monthly compounding step is (1+pct/100)^(1/12)-1. Decimal from 0 to 100. REQUIRED, no default.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed4 schema fields changed
    • addedInput schema / properties / chart_title / maxLength
      Added value: +120
    • changedInput schema / properties / label / description
      Previous value: -"What the spending is, e.g. 'coffee' or 'streaming subscriptions'. Optional."New value: +"What the spending is, e.g. 'coffee' or 'streaming subscriptions'. Optional. Max 120 characters."
    • addedInput schema / properties / label / maxLength
      Added value: +120
    • addedInput schema / properties / monthly_spending / minimum
      Added value: +0.01
  2. Changed8 schema fields changed
    • addedInput schema / properties / annual_return_pct
      Added value: +{
      +  "description": "Effective annual investment return, e.g. 8 not 0.08; the monthly compounding step is (1+pct/100)^(1/12)-1. Decimal from 0 to 100. REQUIRED, no default.",
      +  "type": "number"
      +}
    • addedInput schema / properties / chart_title
      Added value: +{
      +  "default": null,
      +  "description": "Override for the chart title. Must not contain em-dashes or en-dashes. Max 120 characters. Optional.",
      +  "type": [
      +    "string",
      +    "null"
      +  ]
      +}
    • addedInput schema / properties / label
      Added value: +{
      +  "default": null,
      +  "description": "What the spending is, e.g. 'coffee' or 'streaming subscriptions'. Optional.",
      +  "type": [
      +    "string",
      +    "null"
      +  ]
      +}
    • addedInput schema / properties / monthly_spending
      Added value: +{
      +  "description": "Monthly spending to price against investing. Decimal, at least $0.01. The opportunity cost of spending $0 is degenerate and is rejected. REQUIRED, no default.",
      +  "type": "number"
      +}
    • addedInput schema / properties / tax_bracket_pct
      Added value: +{
      +  "default": null,
      +  "description": "Tax bracket as a percentage, applied as a flat haircut to the investment gain. Decimal from 0 to 100. Optional.",
      +  "type": [
      +    "number",
      +    "null"
      +  ]
      +}
    • removedInput schema / properties / toolArguments
      Removed value: -{
      -  "description": "JSON object with these parameters:\n\nmonthly_spending: decimal, at least 0.01 (REQUIRED). The opportunity cost of spending $0 is degenerate and is rejected.\nannual_return_pct: decimal 0-100 as percentage, e.g. 8 not 0.08, an EFFECTIVE ANNUAL rate; the monthly compounding step is (1+pct/100)^(1/12)-1 (REQUIRED)\nyears: int > 0 (REQUIRED)\nlabel: string (optional). e.g. 'coffee' or 'streaming subscriptions'\ntax_bracket_pct: decimal 0-100 (optional)\nchart_title: string (optional) override for the chart title. Must not contain em-dashes or en-dashes. Max 120 characters."
      -}
    • addedInput schema / properties / years
      Added value: +{
      +  "description": "Time horizon in years. Integer, greater than 0. REQUIRED, no default.",
      +  "type": "integer"
      +}
    • changedInput schema / required
      Previous value: -[
      -  "toolArguments"
      -]New value: +[
      +  "monthly_spending",
      +  "annual_return_pct",
      +  "years"
      +]
  3. First observed

TDQS

A5/5.0
Behavior5/5

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

The description adds important behavioral context beyond the annotations. It explicitly states 'Calculation, not advice. Verify with a professional before acting,' which is a critical caveat for a financial tool. It also mentions that the response includes `chart_hints` with rendering directives, which is not indicated by the annotations or schema. Since the annotations already declare readOnlyHint=true and destructiveHint=false, this additional disclosure is exemplary.

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 concise and well-structured. It front-loads the critical caveat and purpose, then immediately provides usage routing. Every sentence adds value—no fluff. The inclusion of the output note about `chart_hints` is efficient. It is not overly long given the tool's complexity.

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?

The description is complete for this tool's complexity. It covers the purpose, usage guidelines, a critical caveat, and even the output's special feature. The schema covers parameters, and the absence of an output schema is mitigated by the mention of `chart_hints`. For a financial calculator, this is exceptionally thorough.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters5/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Although schema description coverage is 100%, the description goes beyond the schema by explaining the core concept of opportunity cost and the context of the parameters (recurring spending, investment return). It also clarifies the tax_bracket_pct's role (flat haircut) and the annual_return_pct's compounding formula, which is not in the schema. This enriches the parameter semantics beyond the field descriptions.

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 the tool's purpose: to calculate the true cost of recurring spending by showing what that money would be worth if invested. It uses specific verbs (calculate, show) and identifies the resource (recurring spending). It also distinguishes itself from sibling tools by naming them explicitly.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides explicit guidance on when to use this tool vs. alternatives: 'Pick this when the input is recurring spending.' It also tells the agent to use `calculate_compound_interest` for balance/contributions and `compare_payoff_vs_invest` when the alternative is paying off debt. This is clear routing with no ambiguity.

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