Skip to main content
Glama

Margen y recargo

margin-markup
Read-onlyIdempotent

Calcula utilidad, margen bruto % (sobre precio) y markup % (sobre costo) a partir de costo y precio de venta. Cuándo: un cálculo de dinero, impuestos o matemática financiera tiene que ser exacto y reproducible (redondeo, centavos, tasas). No para: calcular el precio necesario para un margen objetivo (price-from-margin). Efectos secundarios: ninguno (solo lectura, sin red, sin estado guardado). Determinista: la misma entrada da la misma salida. Límites: entrada JSON de hasta 64 KB, 1 s por llamada, resultado de hasta 1 MB.

EN: Computes profit, gross margin % (profit/price), markup % (profit/cost) and the price multiplier from unit cost and selling price. When: a money, tax or financial-math result has to be exact and reproducible (rounding, cents, rates). Not for: computing the selling price needed for a target gross margin % (price-from-margin). Side effects: none (read-only, no network access, no stored state). [EN completo / full EN: inputSchema.description]

Input Schema

NameRequiredDescriptionDefault
costYesUnit cost (number; required; min 0; max 1000000000000000).
priceYesSelling price (number; required; min 0; max 1000000000000000).

Output Schema

NameRequiredDescriptionDefault
profitNo
multiplierNo
margin_percentNo
markup_percentNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changed
    • addedInput schema / properties / cost / examples
      Added value: +[
      +  60
      +]
    • addedInput schema / properties / price / examples
      Added value: +[
      +  100
      +]
  2. Changed1 schema field changed
    • addedInput schema / description
      Added value: +"EN: Computes profit, gross margin % (profit/price), markup % (profit/cost) and the price multiplier from unit cost and selling price. When: a money, tax or financial-math result has to be exact and reproducible (rounding, cents, rates). Not for: computing the selling price needed for a target gross margin % (price-from-margin). Side effects: none (read-only, no network access, no stored state). Deterministic: the same input gives the same output. Limits: JSON input up to 64 KB, 1 s per call, result up to 1 MB."
  3. 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 read-only, closed-world, idempotent and non-destructive, yet the description still adds determinism (same input → same output) and concrete limits (64 KB input, 1 s per call, 1 MB result) that the annotations do not cover. The 'no side effects' sentence largely restates the annotations, which keeps it out of the top band.

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?

The content is front-loaded and dense, but the whole block is duplicated verbatim in Spanish and English, and it ends with a self-referential artifact ('[EN completo / full EN: inputSchema.description]') that adds nothing. Useful material is roughly half the token count.

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?

An output schema exists, so return values need no explanation. The description supplies the inputs, the exclusion to the sibling, the safety/determinism profile and operating limits — everything needed to call a two-number pure function correctly.

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% with min/max and examples for both parameters, so the baseline is 3. The description adds real meaning beyond the schema by fixing the denominator of each ratio (margin over price, markup over cost), which is the ambiguity an agent would otherwise guess at.

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 plus the exact outputs: profit, gross margin % (profit/price), markup % (profit/cost) and the price multiplier, from cost and selling price. It explicitly names the sibling it is not (price-from-margin), so an agent can discriminate it without opening the schema.

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?

Provides an explicit 'Cuando'/'When' condition (exact, reproducible money/tax/financial math) and an explicit 'No para' exclusion routing the target-margin case to price-from-margin. Both a when and a when-not with a named alternative are present.

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