Skip to main content
Glama

Margin & markup calculator

hopi_margin_calculator
Read-onlyIdempotent

Work out profit, gross margin and markup from a cost price and a selling price. Margin is profit as a percentage of the selling price; markup is profit as a percentage of the cost. Amounts in GBP. Source: https://hopi.co.uk/margin-calculator/

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
costYesCost price in GBP
priceYesSelling price in GBP

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
costNo
priceNo
profitNo
summaryYes
source_urlYesThe tool's page on hopi.co.uk (cite or open to check the figure)
marginPercentNo
markupPercentNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • addedOutput schema / required
      Added value: +[
      +  "source_url",
      +  "summary"
      +]
  2. First observed

TDQS

A4.5/5.0
Behavior4/5

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

Annotations already declare readOnlyHint, idempotentHint, and destructiveHint, so the safety profile is covered. The description adds valuable behavioral context by defining how margin and markup are calculated from the two inputs, which prevents misinterpretation of the outputs. It also fixes the currency to GBP. No contradictions.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is extremely compact: one sentence for purpose, one for definitions, one for currency/source. No filler or repetition of schema fields. It front-loads the core purpose and keeps supporting detail minimal.

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?

For a two-parameter calculator with complete schema descriptions, existing output schema, and annotations covering safety, the description is fully adequate. It provides the calculation definitions and currency context, leaving no ambiguity about what the tool does or what inputs it 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?

The schema already provides 100% coverage with descriptions for both cost and price. The description adds meaning beyond the schema by clarifying the role of each parameter: cost is the base for markup, selling price is the base for margin. This relationship is not explicit in the schema, so the description enhances parameter understanding.

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 opens with a specific verb ('Work out') and resource (profit, gross margin, markup), and clearly distinguishes it from the many sibling calculators by naming exactly what it computes and from which inputs. It also disambiguates margin vs markup, which is essential for correct selection.

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 description clearly implies the usage scenario: when you have a cost price and a selling price. It doesn't explicitly name alternatives or exclusions, but there is no competing sibling for margin/markup, and the formula definitions effectively tell the agent when it's appropriate. It has clear context without an explicit when-not-to-use.

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