Skip to main content
Glama
omnioperand-mcp

omnioperand-mcp

omni_bogo_buy_one_get_one_margin

Calculate real profit margin dilution for Buy One Get One Free or BOGO 50% Off promotions versus normal sales using unit price, COGS, discount depth, and shipping costs.

Instructions

BOGO (Buy One Get One) Promotional Profit Margin Calculator. Calculate the real profit margin dilution of Buy One Get One promotions (BOGO Free vs BOGO 50% Off) against normal non-discounted sales. Discipline: ECOMMERCE. Governing mathematical model / formula: Average Unit Realized Price = [Full Price + (Full Price × (1 - Discount Depth %))] / 2 | Margin % = (Profit / Revenue) × 100.

USAGE GUIDELINES:

  • WHEN TO USE: Invoke for deterministic calculation of total_bogo_checkout_price (Customer BOGO Checkout Total), combined_bogo_profit (Combined Net Profit (2 Units)), blended_realized_margin_pct (Effective Gross Profit Margin (%)), effective_price_per_item (Realized Average Price Per Unit) using single_unit_retail_msrp (Full Single Unit Retail MSRP in $), single_unit_cogs (Single Unit Manufacturing Cost (COGS) in $), bogo_second_unit_discount_pct (Second Item Discount Depth (%) in %), combined_fulfillment_shipping_cost (Combined Two-Unit Shipping Cost in $). 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 'BOGO (Buy One Get One) Promotional Profit Margin 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): "bogo-buy-one-get-one-margin"

    • category (string): "ecommerce"

    • name (string): "BOGO (Buy One Get One) Promotional Profit Margin Calculator"

    • formula (string): Governing mathematical formula string

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

    • metrics (object): Dictionary of computed outputs:

      • metrics.total_bogo_checkout_price (Customer BOGO Checkout Total): Formatted display string (e.g. '$48.00 (2 Units)')

      • metrics.combined_bogo_profit (Combined Net Profit (2 Units)): Formatted display string (e.g. '+$16.80 Net Profit')

      • metrics.blended_realized_margin_pct (Effective Gross Profit Margin (%)): Formatted display string (e.g. '35.0%')

      • metrics.effective_price_per_item (Realized Average Price Per Unit): Formatted display string (e.g. '$24.00 / unit')

    • 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_bogo_buy_one_get_one_margin"
  }
}

Input Schema

NameRequiredDescriptionDefault
single_unit_cogsNoSingle Unit Manufacturing Cost (COGS) ($). Landed wholesale cost per unit. Default: 11.5. Min: 1. Max: 200.
single_unit_retail_msrpNoFull Single Unit Retail MSRP ($). Normal selling price for one unit. Default: 48. Min: 5. Max: 500.
bogo_second_unit_discount_pctNoSecond Item Discount Depth (%) (%). 100% = Buy One Get One Free; 50% = Buy One Get One Half Off. Default: 100. Min: 25. Max: 100.
combined_fulfillment_shipping_costNoCombined Two-Unit Shipping Cost ($). Shipping cost to send two units in single package. Default: 8.2. Min: 2. Max: 50.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv0.1.2

TDQS

A4.5/5.0
Behavior5/5

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

No annotations are supplied, so the description carries the whole burden and does so: read-only, idempotent, stateless, zero side effects, deterministic floating-point behavior, and out-of-bounds inputs returning a safe diagnostic error rather than throwing. It also enumerates the success/error envelope, which is the behavioral detail 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.

Conciseness3/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Headings (USAGE, DISAMBIGUATION, BEHAVIOR & SAFETY, RETURNS) make it scannable and front-loaded, but the WHEN TO USE bullet is a long run-on that enumerates every parameter verbatim, duplicating the schema. The RETURNS section also restates the formula and category strings already covered by the body. Some trimming would not lose information.

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?

There is no output schema, yet the description fully documents the response envelope including status, calculator, category, formula, echoed inputs, and each computed metric with its display format. Combined with the explicit validation-failure behavior, an agent has everything needed to call it and parse the result.

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% with defaults and min/max bounds, so the schema already documents every parameter. The description restates the same parameter names and units in the WHEN TO USE sentence and adds no new semantics such as interaction between discount depth and MSRP or which combination is degenerate. Baseline 3 applies.

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?

Opens with a specific verb+resource ('BOGO Promotional Profit Margin Calculator') and scopes what is measured (margin dilution of BOGO Free vs BOGO 50% Off against non-discounted sales). It also states the governing formula, which lets an agent confirm in one read that this is the right ecommerce calculation and not, say, omni_margin_markup or omni_landed_cost_unit_margin.

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?

Explicit WHEN TO USE with the exact four outputs computed, an explicit WHEN NOT TO USE ('qualitative evaluations or unquantified reasoning', all inputs must be numeric), and named alternatives: omni_universal_query for generic dispatch, omni_batch_calculate for chained jobs, omni_describe_solver for schema inspection. This is a full routing decision, not an implication.

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