Skip to main content
Glama

Calculate a profit margin

calculate_profit_margin
Read-only

Calculate the profit margin and markup from a cost and a selling price, or the selling price needed for a target margin.

Input Schema

NameRequiredDescriptionDefault
costYesCost of the item or job
priceNoSelling price
targetMarginPercentNoMargin wanted, as a percentage of price

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=true, destructiveHint=false and openWorldHint=false, so the safety profile is covered without description help. The description adds the two-mode computation behavior, but says nothing about validation of conflicting inputs or the shape of the result.

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?

A single sentence that front-loads the action and packs both input modes without waste. No filler, no redundancy with the title.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

No output schema exists, yet the description only loosely gestures at returns ("the profit margin and markup") and omits what happens when the optional parameters are absent or contradictory. Adequate for a simple calculator, but the conditional-input contract is left partly implicit.

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 the schema cannot: price yields margin and markup, while targetMarginPercent yields the required selling price, clarifying the conditional relationship between optional params.

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?

Specific verb (calculate) plus resources (profit margin, markup) and an explicit statement of the two input modes. It does not, however, distinguish itself from the sibling calculate_markup tool, which overlaps with the markup half of this description.

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 two usage modes (supply price to get margin/markup, supply targetMarginPercent to get the required price), which is genuine routing guidance. But it never states when to prefer this over calculate_markup, nor what happens if neither price nor targetMarginPercent is supplied.

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.