Skip to main content
Glama

Precio desde margen objetivo

price-from-margin
Read-onlyIdempotent

Calcula el precio necesario para un margen objetivo (precio = costo / (1 − m)) o un markup, y convierte entre ambos. Cuándo: un cálculo de dinero, impuestos o matemática financiera tiene que ser exacto y reproducible (redondeo, centavos, tasas). No para: calcular utilidad, margen bruto % (margin-markup). 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 the selling price needed for a target gross margin % (price = cost / (1 − m)) or markup % (price = cost × (1 + k)), and converts between margin and markup. When: a money, tax or financial-math result has to be exact and reproducible (rounding, cents, rates). Not for: computing profit, gross margin % (margin-markup). Side effects: none (read-only, no network access, no stored state). Deterministic: the same input gives the same output. [EN completo / full EN: inputSchema.description]

Input Schema

NameRequiredDescriptionDefault
costYesUnit cost (number; required; min 0; max 1000000000000000).
targetYesTarget type (required; one of: margin, markup).
percentYesTarget % (number; required; min 0; max 10000).
decimalsNoRound price to decimals (integer; optional; default 2; min 0; max 6).

Output Schema

NameRequiredDescriptionDefault
priceNo
profitNo
margin_percentNo
markup_percentNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed3 schema fields changed
    • addedInput schema / properties / cost / examples
      Added value: +[
      +  60
      +]
    • addedInput schema / properties / percent / examples
      Added value: +[
      +  40
      +]
    • addedInput schema / properties / target / examples
      Added value: +[
      +  "margin"
      +]
  2. Changed1 schema field changed
    • addedInput schema / description
      Added value: +"EN: Computes the selling price needed for a target gross margin % (price = cost / (1 − m)) or markup % (price = cost × (1 + k)), and converts between margin and markup. When: a money, tax or financial-math result has to be exact and reproducible (rounding, cents, rates). Not for: computing profit, gross margin % (margin-markup). 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.7/5.0
Behavior5/5

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

Annotations already cover read-only and idempotency, but the description adds determinism guarantees, no-network/no-stored-state, and concrete operational limits (64 KB input, 1 s per call, 1 MB result). That is meaningful context beyond what the structured fields provide.

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 well front-loaded with the formula first, but the Spanish and English blocks are near-verbatim duplicates, and the trailing '[EN completo / full EN: inputSchema.description]' pointer is noise. Roughly half the text is redundant.

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 deterministic pure-calculation tool with an output schema, full annotation coverage, and complete parameter docs, the description supplies everything else needed: domain, formulas, exclusions, determinism, and execution limits.

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 description coverage is 100%, so baseline is 3. The formula in the description adds real semantic linkage between cost, target, and percent (which denominator applies), which the schema field descriptions do not convey.

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 formula (price = cost / (1 − m)), and also covers the markup variant and margin↔markup conversion. It explicitly contrasts itself with the sibling margin-markup, so an agent can disambiguate at a glance.

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?

Gives an explicit 'Cuándo' condition (money/tax/financial math needing exact, reproducible rounding) and an explicit 'No para' exclusion naming computing profit and gross margin % with the margin-markup alternative. Use vs. avoid is fully specified.

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