Skip to main content
Glama

Calculate profit per unit

calculate_profit
Read-onlyIdempotent

Use this when the user asks what they make per unit after VAT, marketplace commission (noon, Amazon), fulfilment, ads and costs, or their break-even price or margin. Unit economics for a UAE seller in AED: what is left of a selling price after 5% VAT, coupons, marketplace commission, fulfilment, storage, ads, returns, purchase cost, shipping, customs and packaging, with margin, markup, break-even price, monthly profit and break-even units. VAT is handled both ways: output VAT is taken out of the price when the seller is VAT registered, and VAT charged on purchases and fees is a cost only when it cannot be reclaimed. Costs are excluding VAT. Anything not given counts as 0; use only figures the user gave, as fees differ by marketplace and category. Do not use it for a connected business's actual profit and loss (get_profit_and_loss).

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "business_type": "<business_type>",
      "price": "<price>",
      "vat_registered": "<vat_registered>",
      "purchase_cost": "<purchase_cost>"
    },
    "name": "calculate_profit"
  }
}

Input Schema

NameRequiredDescriptionDefault
priceYesSelling price per unit, AED.
packagingNoPer unit, AED.
storage_feeNoStorage per unit sold, AED excluding VAT.
customs_costNoCustoms duty and clearance per unit, AED.
business_typeYesnoon, amazon, own_store, trading or services. Decides which costs apply.
purchase_costYesPurchase cost per unit excluding VAT (services: direct cost per job), AED.
fulfilment_feeNoFulfilment or delivery per unit, AED excluding VAT.
vat_registeredYesWhether the seller is VAT registered.
returns_percentNoReturned units per 100 sold.
units_per_monthNo
ad_cost_per_unitNoAd spend per unit sold, AED.
discount_percentNo
fees_vat_chargedNoThe platform adds 5% VAT on its commission, fulfilment and storage fees.
inbound_shippingNoPer unit, AED.
commission_percentNoMarketplace commission, or payment and platform fees, in %.
price_includes_vatNotrue when the price already includes 5% VAT. Default false.
ad_percent_of_salesNoAd spend as % of net sales. Or use ad_cost_per_unit.
fixed_monthly_costsNoLicence, rent, staff, software… per month, AED.
purchase_vat_chargedNoThe supplier adds 5% VAT on the purchase cost.
commission_on_vat_inclusive_priceNoCommission is charged on the VAT-inclusive price.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.4/5.0
Behavior4/5

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

Annotations already declare this as a safe, idempotent, closed-world read, so the bar is lower. The description still adds real behavioral context annotations cannot: VAT is treated both ways depending on registration and reclaimability, all costs are ex-VAT, and missing inputs default to 0. It stops short of stating rounding or output shape conventions.

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?

The use case and exclusion are correctly front-loaded, but the cost list is effectively given twice ('VAT, marketplace commission (noon, Amazon), fulfilment, ads and costs' then again in the next sentence as 'VAT, coupons, marketplace commission, fulfilment, storage, ads, returns, purchase cost, shipping, customs and packaging'). The duplicated enumeration adds length without adding meaning.

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?

For a 20-parameter, no-output-schema tool, the description does the necessary work: it names the returned quantities (margin, markup, break-even price, monthly profit, break-even units) and sets input-completeness expectations. Only minor gaps remain, such as how defaults interact with VAT-registration flags and any rounding or currency assumptions in the result.

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 coverage is 90%, so most parameters are already documented and the baseline is 3. The description compensates for the gaps by explaining the semantics behind the VAT booleans, why fees vary by marketplace and category (discouraging guessed values), and how business_type drives which costs apply.

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 and resource ('calculate profit per unit') with precise scope: UAE seller, AED, unit economics. It enumerates the cost categories handled and names the sibling it is not for, so an agent can separate it from get_profit_and_loss without opening either schema.

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?

Gives an explicit trigger ('when the user asks what they make per unit after VAT, marketplace commission...'), an explicit exclusion ('Do not use it for a connected business's actual profit and loss (get_profit_and_loss)'), and an operating rule that unstated inputs count as 0 and only user-supplied figures should be used. Nothing material is left to inference.

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