Skip to main content
Glama

MaCalculatriceEnLigne

Calculate Profit Margin

calculate_profit_margin
Read-onlyIdempotent

Calculate gross margin, net margin, and markup percentage. Returns: {revenue, cost}. See list_bundles for related 'finance-universal' calculators.

Input Schema

NameRequiredDescriptionDefault
costYesTotal cost
revenueYesTotal revenue/selling price

Output Schema

NameRequiredDescriptionDefault
resultNoComputed result. Object whose fields depend on the tool (e.g. {tax, marginal_rate, brackets} for tax tools, {volume_l, gallons} for volume tools).
sourceNoAuthoritative source for the rule or formula (e.g. "Article 197 CGI", "NF DTU 21").
formulaNoHuman-readable formula or method used (e.g. "I=P·r·t", "Magnus formula").
reference_urlNoLink to a calcul2 page documenting the calculation in detail.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

C2.9/5.0
Behavior2/5

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

Annotations already declare readOnlyHint/idempotentHint/destructiveHint=false, so the safe, deterministic computation profile is covered. The description's only added behavioral claim, 'Returns: {revenue, cost}', is confusing and likely wrong for a tool whose inputs are exactly revenue and cost and whose output is margins, which actively misleads rather than informs.

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?

Two short sentences with the computed metrics front-loaded; there is no filler. The trailing 'Returns: {revenue, cost}' clause is the one wasted/confusing element that keeps it from a 5.

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?

For a two-input pure calculator with full schema description coverage, complete annotations, and an existing output schema, almost nothing essential is missing. The one substantive gap is the misleading return-value sentence, which the output schema already makes unnecessary and which could cause an agent to misinterpret the result.

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 coverage is 100% with two well-described numeric parameters (cost, revenue), so the schema carries the parameter semantics and the baseline of 3 applies. The description adds no units, currency assumptions, or edge-case behavior (e.g., zero revenue/cost) beyond what the schema states.

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?

States a specific verb (Calculate) and the exact outputs (gross margin, net margin, markup percentage), which is more informative than a tautology. However, it does nothing to distinguish itself from the near-identical sibling calculate_markup_margin, so an agent still cannot route between the two from the description alone.

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

Usage Guidelines2/5

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

The only guidance is a cross-reference ('See list_bundles for related finance-universal calculators'), which points at a catalog rather than telling the agent when to pick this tool over calculate_markup_margin or calculate_margin-style siblings. No prerequisites, conditions, or exclusions are given.

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.