Skip to main content
Glama
omnioperand-mcp

omnioperand-mcp

omni_smoking_cost

Calculates annual and lifetime smoking costs, lost investment returns, and pack-years lung cancer risk from packs per day, pack price, and years smoked.

Instructions

Smoking Cost & Pack-Years Health Calculator. Calculate lifetime financial cost, lost investment compound interest, and clinical pack-years lung cancer risk index from cigarette smoking. Discipline: HEALTH. Governing mathematical model / formula: Pack-Years = (Cigarettes per Day / 20) × Years Smoked.

USAGE GUIDELINES:

  • WHEN TO USE: Invoke for deterministic calculation of annual_cash_cost (Annual Cash Out-of-Pocket), lifetime_spent (Lifetime Cash Spent), investment_lost (Opportunity Cost (8% S&P 500)), pack_years_index (Clinical Pack-Years Index) using packs_per_day (Packs Smoked per Day in packs/day), cost_per_pack (Cost per Pack), years_smoked (Years Smoked in yrs). Guarantees exact machine floating-point precision, eliminating LLM arithmetic mistakes and formula hallucinations.

  • WHEN NOT TO USE: Do not use for qualitative evaluations or unquantified reasoning. All input parameters must be valid numerical values.

DISAMBIGUATION & BOUNDARIES:

  • Use this dedicated specialist tool for 'Smoking Cost & Pack-Years Health Calculator' rather than generic dispatchers like omni_universal_query.

  • For multi-calculation chained jobs, use 'omni_batch_calculate'.

  • To inspect schema fields, see 'omni_describe_solver'.

BEHAVIOR & SAFETY:

  • Pure deterministic computation with machine floating-point precision.

  • Read-only, idempotent, and stateless. Zero side effects or persistent state mutations.

  • Input validation: All arguments are validated against physical and domain bounds. Out-of-bounds inputs return a safe diagnostic error status without throwing runtime exceptions.

RETURNS:

  • Structured JSON object containing:

    • status (string): "success" on valid execution or "error" if validation fails

    • calculator (string): "smoking-cost"

    • category (string): "health"

    • name (string): "Smoking Cost & Pack-Years Health Calculator"

    • formula (string): Governing mathematical formula string

    • inputs (object): Echoed input parameter dictionary with applied defaults

    • metrics (object): Dictionary of computed outputs:

      • metrics.annual_cash_cost (Annual Cash Out-of-Pocket): Formatted display string (e.g. '$3,467.50 / yr')

      • metrics.lifetime_spent (Lifetime Cash Spent): Formatted display string (e.g. '$52,012.50')

      • metrics.investment_lost (Opportunity Cost (8% S&P 500)): Formatted display string (e.g. '$94,150.00')

      • metrics.pack_years_index (Clinical Pack-Years Index): Formatted display string (e.g. '15.0 Pack-Years (High Risk)')

    • execution_time_ms (number): Latency in milliseconds.

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {},
    "name": "omni_smoking_cost"
  }
}

Input Schema

NameRequiredDescriptionDefault
years_smokedNoYears Smoked (yrs). Total duration of smoking. Default: 15. Min: 1. Max: 60.
cost_per_packNoCost per Pack. Average US pack price: $8 to $14. Default: 9.5. Min: 5. Max: 20.
packs_per_dayNoPacks Smoked per Day (packs/day). 1 pack = 20 cigarettes. Default: 1. Min: 0.25. Max: 4.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv0.1.2

TDQS

A4.6/5.0
Behavior5/5

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

With no annotations supplied, the description carries the full behavioral burden and does so: it declares pure deterministic computation with machine floating-point precision, read-only/idempotent/stateless semantics with zero side effects, and validation against physical/domain bounds that returns a diagnostic error status rather than throwing. That covers the safety profile an agent needs before calling.

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?

Well front-loaded: purpose, formula, usage, disambiguation, behavior, and returns appear in that order. Some redundancy exists — the example display strings repeat each metric's label verbatim and the precision claim appears twice (usage and behavior) — but nothing is materially wasteful given there is no output schema to lean on.

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?

For a 3-parameter read-only calculator with no output schema, the description supplies the formula, the full return object structure including nested metrics and their formatted display strings, error status behavior, and a latency field. An agent has everything needed to construct a call and interpret the response.

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 100%, so units, defaults, and min/max bounds are already fully documented in the schema. The description restates the same three parameters with the same units ('packs_per_day (Packs Smoked per Day in packs/day)') without adding interpretation, interdependencies, or edge-case meaning. Baseline 3 applies when the schema does the heavy lifting.

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 names a specific verb+resource ('Calculate lifetime financial cost... pack-years lung cancer risk index from cigarette smoking') and states the governing formula, Pack-Years = (Cigarettes per Day / 20) × Years Smoked. It also lists the four exact metrics produced, so an agent knows precisely what output to expect and can distinguish it from other health/cost calculators.

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?

It provides explicit WHEN TO USE (deterministic calculation of the four named metrics from the three named inputs) and WHEN NOT TO USE (qualitative evaluation, non-numeric inputs). It also routes to concrete alternatives: omni_universal_query for generic dispatch, omni_batch_calculate for chained jobs, and omni_describe_solver for schema inspection.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Deploy Server

Other Tools