Skip to main content
Glama

x402-margin-calc

Margin Calc: Computes profit, margin percent, and markup percent from cost and price, or derives price from cost and a target margin percent 🆓 5 free trial calls per signed wallet

Input Schema

NameRequiredDescriptionDefault
costNo
priceNo
marginNo
revenueNo
marginPercentNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed5 schema fields changed
    • removedInput schema / properties / cost / description
      Removed value: -"Cost to process"
    • removedInput schema / properties / margin / description
      Removed value: -"Margin to process"
    • removedInput schema / properties / marginPercent / description
      Removed value: -"MarginPercent to process"
    • removedInput schema / properties / price / description
      Removed value: -"Price to process"
    • removedInput schema / properties / revenue / description
      Removed value: -"Revenue to process"
  2. First observed

TDQS

B3.1/5.0
Behavior3/5

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

With no annotations, the description carries the full burden. It does disclose the payment gate ('5 free trial calls per signed wallet'), which is genuine behavioral context about auth/rate limits, but it says nothing about output format, error behavior, or whether calls beyond the trial are charged.

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?

Single front-loaded sentence that states purpose first, followed by the trial-call note. No filler, though the emoji/promo tail is only marginally useful.

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

Completeness2/5

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

Five all-optional parameters with zero schema descriptions, no output schema and no annotations leave substantial gaps: the agent cannot tell which parameter combination produces which result or what the response looks like. Given the complexity of a multi-mode calculator, the description should do considerably more.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters2/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 0% and there are 5 parameters, so the description must compensate. It mentions cost, price and target margin percent but never explains 'margin', 'revenue', or 'marginPercent', nor how the parameters group into the two described modes, leaving four undocumented fields ambiguous.

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?

The description names a specific verb and resource ('Computes profit, margin percent, and markup percent') and even the inverse mode ('derives price from cost and a target margin percent'). It is clear what the tool does, but it never distinguishes itself from nearby siblings such as x402-markup-calc, x402-profit-margin or x402-gross-margin, which an agent must pick between.

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?

Two operating modes are implied by the phrasing (cost+price → profit/margin/markup; cost+target margin → price), which gives some context for how to invoke it. However there is no explicit when-to-use statement, no mention of which sibling to prefer, and no note about required vs optional inputs for each mode.

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