Skip to main content
Glama

Money Sums

Profit margin and markup on a sale

business.margin
Read-only

Use this when a trader gives what an item costs them and either what they sell it for, the margin they want, or the markup they want, and asks for the profit, the margin, the markup or what to sell it for (for example "I buy a bag of rice for 800 and want a 20% margin"). It keeps margin (a share of the sale) and markup (a share of the cost) apart, which are often confused. Do not use it for tax on a sale (use a VAT tool), for exchange rates, or to suggest what the market will pay.

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": {
      "cost": "<cost>"
    },
    "name": "business.margin"
  }
}

Input Schema

NameRequiredDescriptionDefault
costYesWhat one item costs the seller to buy or make.
currencyNoThe currency, as its three-letter code (GHS, NGN, KES, ZAR...). Only labels the answer; leave out if unknown.
sale_amountNoWhat one item is sold for. Give this, or margin_percent, or markup_percent.
margin_percentNoThe profit wanted as a per cent of the sale amount.
markup_percentNoThe profit wanted as a per cent of the cost.

Output Schema

NameRequiredDescriptionDefault
costYes
noteYes
profitYes
currencyNo
explore_urlNo
sale_amountYes
margin_percentYes
markup_percentYes

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 cover safety (readOnlyHint true, destructiveHint false, openWorldHint false), so the description only needs supplementary context, and it supplies useful semantics: margin is a share of the sale while markup is a share of the cost. It also implies currency is a label rather than a conversion, reinforcing openWorldHint=false. It does not say what happens if the agent supplies conflicting inputs (e.g. both sale_amount and margin_percent), which is the one behavioral question left open.

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?

The use-case and the margin/markup distinction are front-loaded, and the exclusions are compressed into one short sentence. The opening sentence is long and clause-heavy, but every clause carries routing information rather than filler.

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 to describe returns and annotations to describe safety, the description only needs to carry invocation intent, domain vocabulary (trader, margin vs markup), and scope limits — all of which it does, including a numeric example that anchors the expected inputs.

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 coverage is 100% and each parameter already carries a definition, including the margin-vs-markup distinction and the 'give this, or...' disjunction. The description restates that distinction usefully but adds no syntax, precedence, or rounding detail beyond the schema, so the baseline of 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?

The description states a specific computation (profit, margin, markup, or selling price) from a specific input set (cost plus one of sale price, margin percent, or markup percent), and explicitly separates margin from markup. The exclusions ('not for tax', 'not for exchange rates') further sharpen the boundary against siblings such as business.break_even and loan tools.

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 gives an explicit trigger condition ('when a trader gives what an item costs them and either...'), a concrete worked example with numbers, and three named when-not cases. An agent can route to this tool or away from it without opening the schema.

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