Skip to main content
Glama

ScorpTech x402 Tools

Markup Margin

markup_margin
Read-onlyIdempotent

Price, margin and markup in exact cents. Analyze a cost and a price (margin is profit / price, markup is profit / cost). Or set a price from a cost and a margin percent (price = cost / (1 − margin)), or from a markup percent (price = cost × (1 + markup)). Or walk a list of successive discounts off a price, rounding each step half away from zero to the cent. Returns JSON with: cost, price, profit, marginPct, markupPct, method. Price: $0.001 USDC per successful call (x402, Base or Solana). Same tool over HTTPS: GET https://scorptech.it.com/api/x402/v1/markup-margin

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {},
    "name": "markup_margin"
  }
}

Input Schema

NameRequiredDescriptionDefault
costNo
modeNoanalyze
priceNo
discountsNoSuccessive percent-off discounts, e.g. 20,10
marginPctNo
markupPctNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A4.3/5.0
Behavior5/5

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

Annotations only cover safety (readOnly, idempotent, non-destructive); the description adds genuinely new operational facts: cent-exact arithmetic, the 'round half away from zero' rounding rule for each discount step, the returned JSON keys (cost, price, profit, marginPct, markupPct, method), and the $0.001 USDC x402 payment plus an equivalent HTTPS GET endpoint. Payment/auth requirements and rounding semantics are exactly the kind of behavior an agent cannot get from the annotations.

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?

Front-loaded with the purpose, then four compact 'Or …' clauses mapping to modes, then returns, then pricing. Nearly every clause carries information, though the run of 'Or …' sentences reads as one dense block and the endpoint/pricing tail slightly dilutes the operational core.

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

Completeness4/5

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

With no output schema, the description correctly enumerates the return keys, and it covers payment and rounding behavior. The remaining gap is per-mode parameter requirements and what happens with missing or conflicting inputs (e.g. supplying both marginPct and markupPct), which matters for a 6-parameter, zero-required tool.

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 description coverage is only 17% across 6 parameters, so the description must compensate. It does convey meaning for marginPct, markupPct, and the discounts list via the formulas and the 'successive discounts, rounding each step' phrasing, but it never states which parameters are needed for which mode (the schema marks all 6 as optional), leaving the agent to infer 'cost + price for analyze', 'cost + marginPct for from-margin', and so on.

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?

Opens with a specific domain statement ('Price, margin and markup in exact cents') and then enumerates the four computations the tool performs with explicit formulas (margin = profit/price, price = cost/(1 − margin), price = cost × (1 + markup)). An agent can distinguish this from the numeric siblings (arithmetic_mean, apery, etc.) without inspecting 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 Guidelines4/5

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

Each mode is tied to a concrete use case: 'analyze' for cost+price, 'from-margin'/'from-markup' for deriving a price, 'discount' for walking successive percent-off steps. That is a de facto mode-selection guide. It stops short of naming when NOT to use the tool or of stating which parameters each mode requires.

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