Skip to main content
Glama

Profit Margin Calculator API - margin, markup, price from cost

profit_margin_calculator
Read-onlyIdempotent

From cost and price get margin %, markup % and profit; or from cost and wanted margin/markup get the selling price; optional VAT on top. Runs on our server, files are deleted right after the call, nothing stored. Free: 5 calls/day per IP. Paid: Radar API key (from €15/mo at https://radarbg.com/pricing#starter via X-API-Key) or $0.001/call via x402 at https://radarbg.com/x402/profit-margin-calculator.

Example tool call

This call uses example arguments supplied in the tool’s input schema.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "cost": 60,
      "mode": "cp",
      "price": 100
    },
    "name": "profit_margin_calculator"
  }
}

Input Schema

NameRequiredDescriptionDefault
vatNoVAT % on top (optional)
costNoCost
modeNocp cost+price, cm cost+margin %, ck cost+markup %cp
priceNoSelling price (mode=cp)
percentNoMargin or markup percent (mode=cm/ck)

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.2/5.0
Behavior5/5

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

Goes well beyond the readOnly/openWorld/idempotent annotations by disclosing rate limits (5 calls/day per IP), the paid paths (Radar API key via X-API-Key, or $0.001/call via x402), and data handling ('runs on our server, files are deleted right after the call, nothing stored'). These are exactly the auth, quota, and retention facts an agent needs before invoking.

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?

Front-loaded with the actual computation in a single dense sentence, followed by the operational/pricing sentence. Every sentence earns its place, though the pricing URL and payment-channel detail make the second half long; still no filler or repetition.

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, and the description compensates by naming the returned quantities (margin %, markup %, profit, or selling price). Combined with the three modes, VAT option, and cost/access model, an agent has everything needed to call this correctly on a purely computational tool.

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 the enum descriptions already explain cp/cm/ck, so the schema does the heavy lifting. The description adds a little meaning by spelling out that price is required in one direction and percent in the other, and that VAT is applied 'on top', but it does not clarify defaults or edge cases (e.g. zero price). 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?

Names the specific resource and the concrete computations in both directions: 'From cost and price get margin %, markup % and profit; or from cost and wanted margin/markup get the selling price'. The three input combinations are stated in prose, so an agent can tell what this does without opening the schema, and it is distinct from a generic percentage or VAT calculator sibling.

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

Usage Guidelines3/5

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

The description implies when each direction applies (you have price vs. you want price) and notes VAT is optional, which is useful framing. However, it gives no explicit routing against siblings such as eu_vat_calculator or percentage_calculator, and no statement of when not to use it. Usage is implied rather than prescribed.

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