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 €9/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. Added

TDQS

A3.6/5.0
Behavior3/5

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

Annotations already declare readOnlyHint, idempotentHint and openWorldHint, so safety and repeatability are covered upstream. The description adds genuinely useful operational context beyond that: server-side execution, per-IP rate limit of 5 calls/day, and the two auth paths (X-API-Key or x402 payment). The 'files are deleted right after the call' sentence is boilerplate for a tool with no file parameters and adds no real signal.

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 functional sentence is front-loaded and dense with the two calculation paths, and commercialization details follow afterward. Every part is short and readable. The file-deletion clause is wasted words and the pricing/URL block, while useful, crowds the description.

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?

With no output schema, the description compensates by enumerating the returned quantities (margin %, markup %, profit, or selling price) and noting VAT is layered on top. Combined with the auth and rate-limit notes, an agent has what it needs to call this 5-parameter, mode-driven tool. Only the precise response shape for each mode remains unstated.

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% and the enum values (cp/cm/ck), VAT, price and percent are all documented in the schema. The prose mentions the modes and optional VAT but contributes no syntax, units, constraints or edge-case meaning the schema does not already carry. Baseline 3 is appropriate when the schema does all the work.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description names the exact computation and both directions: cost+price -> margin %, markup %, profit, or cost+target margin/markup -> selling price, plus optional VAT. It is far more specific than the title and lets an agent know precisely what comes back. It stops short of differentiating from overlapping siblings like percentage_calculator or eu_vat_calculator, so no explicit routing is provided.

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

Usage Guidelines4/5

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

The two operating regimes are spelled out with the inputs that select them: supply cost and price for outputs, or cost plus a wanted margin/markup to solve for price. That gives clear when-to-use context for each mode. There are no exclusion statements telling the agent when to prefer a different calculator sibling.

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