Skip to main content
Glama

Margin & Markup Calculator

finance_margin_calculator

Calculate gross profit, profit margin (profit as % of price) and markup (profit as % of cost) from a unit cost and selling price — the two numbers people constantly mix up. Use this when an agent needs to profit margin vs markup, both computed. x402 price $0.01/call (USDC, eip155:8453).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
costYesCost
priceYesSelling price

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A3.6/5.0
Behavior3/5

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

No annotations exist, so the description carries the full disclosure burden. It usefully reveals the tool is paid ($0.01/call, USDC on eip155:8453), which an agent needs before invoking, but says nothing about edge cases such as a zero or negative price/cost.

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

Conciseness3/5

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

Purpose is front-loaded and the pricing note is useful, but the middle sentence is broken English ('needs to profit margin vs markup') and largely restates the first sentence, diluting an otherwise tight definition.

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 and no annotations, the description does name the three computed outputs and the pricing model, which is nearly everything an agent needs for a two-parameter calculator. Only edge-case behavior is left 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% but the schema text is bare ('Cost', 'Selling price'). The description adds 'unit cost' and 'selling price' framing, marginally clarifying that both are per-unit figures, but contributes no format, range, or unit semantics beyond that. Baseline 3 applies when the schema already documents both parameters.

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 (Calculate) plus the exact outputs (gross profit, profit margin, markup) and the two inputs (unit cost, selling price). The parenthetical definitions of margin as '% of price' and markup as '% of cost' cleanly separate it from sibling calculators like finance_roi_calculator or calculators_discount_calculator.

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 sentence 'Use this when an agent needs to profit margin vs markup, both computed' gestures at a usage condition (wanting both figures at once) but is grammatically broken and names no alternatives or exclusions. Usage is implied rather than crisply stated.

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