Skip to main content
Glama

Margin and Markup

margin_markup
Read-onlyIdempotent

Convert between cost, price, gross margin and markup, the same way every time. Send any two that fix the answer: cost and price (get margin, markup and profit); cost and a target margin or markup (get the lowest whole-cent price that meets it); price and a target margin or markup (get the highest whole-cent cost that still meets it); a margin alone (get the same markup) or a markup alone (get the same margin). Or send items (quantity, unit cost, unit price per line, up to 200) to get the blended margin of a basket or order, weighted by revenue. Answer fields: ok, verdict, result, rule, does_not, sources, observation, signature, verify. Errors: ok false with the reason (bad input, too large, hourly limit). Free. No model, no network, nothing you send is stored by the tool, and every answer is signed with LLPRO's key (check it at https://llpro.ai/margin-markup). Not legal, tax or financial advice.

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": "margin_markup"
  }
}

Input Schema

NameRequiredDescriptionDefault
costNoUnit cost (up to 4 decimals).
itemsNoBasket or order lines for a blended margin (up to 200). Send items alone, without the other fields.
priceNoSelling price, before tax (up to 4 decimals).
margin_percentNoGross margin in percent of the price (25 for 25%). Below 100.
markup_percentNoMarkup in percent of the cost (50 for 50%). Above -100.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A4.6/5.0
Behavior4/5

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

Annotations already declare readOnly, idempotent, non-destructive and closed-world, but the description adds genuinely new behavior: pricing model ('Free'), no model or network, nothing stored, answers cryptographically signed with a verification URL, and concrete error modes including an hourly rate limit. The only gap is the absence of any detail on rounding/precision behavior for the returned figures beyond the 'whole-cent' hints.

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 core enumeration of input combinations is front-loaded and dense with useful information; almost every clause carries operational meaning. The trailing list of answer fields, signature/verification URL, and legal disclaimer is a bit of a laundry list, but it compensates for the missing output schema, so it largely earns its space.

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?

Despite having no output schema, the description names all answer fields (ok, verdict, result, rule, does_not, sources, observation, signature, verify) and the error envelope, plus privacy and free/no-network guarantees. For a 5-parameter, zero-required calculator this is as complete as an agent needs.

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 100%, so the baseline is 3, but the description adds real meaning on top: it explains how parameters interact (which pairs are needed to 'fix the answer'), what 'target' means in each combination, and the rounding rule applied ('lowest whole-cent price', 'highest whole-cent cost'). It doesn't clarify the units/precision of the computed outputs, which keeps it below 5.

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 ('Convert between cost, price, gross margin and markup') and immediately pins down the exact conversion semantics ('the same way every time'). An agent can tell what this does without opening the schema, and no sibling tool overlaps with margin arithmetic.

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?

Enumerates every valid input combination and what each returns: cost+price, cost+target, price+target, margin alone, markup alone, or items for a blended basket margin. It also states an explicit exclusion ('Send items alone, without the other fields'), so the agent knows how to route each request without 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