Skip to main content
Glama

Johto Data Landed Cost and Margin Calculator

landed_margin
Read-only

Calculate landed cost and margin from caller-supplied costs, duty/VAT/fee assumptions. Exact decimal arithmetic. No live rate lookup or legal advice. Costs $0.002 USDC per call via x402. Without payment, the call returns the x402 payment requirements; retry with an X-PAYMENT or PAYMENT-SIGNATURE header, or params._meta["x402/payment"].

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "unitCost": "<unitCost>",
      "salePrice": "<salePrice>"
    },
    "name": "landed_margin"
  }
}

Input Schema

NameRequiredDescriptionDefault
feeRateNoCaller-supplied fraction from 0 to 1; 0.1 means 10%
vatRateNoCaller-supplied fraction from 0 to 1; 0.1 means 10%
currencyNoShared currency of every supplied amountUSD
dutyRateNoCaller-supplied fraction from 0 to 1; 0.1 means 10%
fixedFeeNoCaller-supplied amount in the shared currency, up to 1000000, max six decimals
shippingNoCaller-supplied amount in the shared currency, up to 1000000, max six decimals
unitCostYesCaller-supplied amount in the shared currency, up to 1000000, max six decimals
insuranceNoCaller-supplied amount in the shared currency, up to 1000000, max six decimals
otherCostNoCaller-supplied amount in the shared currency, up to 1000000, max six decimals
salePriceYesCaller-supplied amount in the shared currency, up to 1000000, max six decimals
customsValueNoCaller-supplied amount in the shared currency, up to 1000000, max six decimals

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?

Goes well beyond the readOnlyHint/openWorldHint annotations by disclosing exact decimal arithmetic and, critically, the x402 payment contract: $0.002 USDC per call, an unpaid call returns payment requirements rather than a result, and how to retry with X-PAYMENT/PAYMENT-SIGNATURE headers or params._meta. This is the kind of invocation-blocking behavior an agent cannot infer elsewhere.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Four short sentences, front-loaded with purpose, then constraints, then the payment mechanics. No filler; the payment sentences are dense but each carries essential invocation information.

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?

Payment, arithmetic, and scope are covered thoroughly, but with 11 parameters and no output schema, the description never says what comes back — whether margin is a percentage or absolute, whether a cost breakdown is returned, or how missing optional costs are treated. That return-shape gap matters for a calculator whose only value is its output.

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 100%, so every parameter's meaning, range, and format is already documented in the schema. The description only gestures at the parameter families ('costs, duty/VAT/fee assumptions') without adding computation semantics, so the baseline 3 applies.

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 ('Calculate landed cost and margin') and immediately bounds the inputs as caller-supplied, which distinguishes it from the rate-lookup siblings such as us_hts_tariff_lookup and china_us_duty_layers. An agent can tell what this does and does not do 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 Guidelines4/5

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

Explicitly rules out live rate lookup and legal advice, telling the agent to bring its own duty/VAT/fee assumptions, which implicitly routes rate discovery to the tariff siblings. It does not name those siblings or state when margin vs. cost-only computation is appropriate, so it stops short of full alternative routing.

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