Skip to main content
Glama

Japan import profit for several products at once

calculate_import_profit_many
Read-only

Run calculate_import_profit for up to 50 products in one call (each line is its own shipment). Put shared conditions (currency, feePct, targetMargin, taxable, declarationDate...) in common; each line overrides them. Returns per-line landed cost, profit, margin, verdict, break-even price, the defaulted fields and openInBrowser, plus a summary with loss lines, and screenCsv: the same lines as a CSV that the site's 「まとめて計算(CSV)」 screen opens, so a person can check and change all lines at once (offer it as a file to save). A bad line returns its own error and does not stop the others. Estimates only. Actual duty depends on the HS classification, origin and customs value decided by Japan Customs. これは目安でございます。実際の税額は、税関が決定する品目分類・原産地・課税価格によって変わります。

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": {
      "lines": "<lines>"
    },
    "name": "calculate_import_profit_many"
  }
}

Input Schema

NameRequiredDescriptionDefault
linesYesOne object per product: the calculate_import_profit fields (itemId, goods, qty, price, ...) plus an optional short label.
commonNoOptional conditions shared by every line. Same fields as calculate_import_profit.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A4.6/5.0
Behavior5/5

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

Annotations already establish this is a safe, closed-world read, and the description adds substantial behavior beyond that: per-line error isolation ('a bad line returns its own error and does not stop the others'), the exact return payload including defaulted fields and openInBrowser, the screenCsv artifact and how to present it, plus an estimates-only disclaimer about actual duty. That is precisely the kind of context annotations cannot carry.

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?

The purpose is front-loaded, then returns, then error behavior, then the disclaimer — a sensible order with dense but useful sentences. The one inefficiency is the duty disclaimer repeated in both English and Japanese, which adds length without new information for a non-Japanese-reading caller.

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?

With no output schema, the description carries the burden of explaining returns, and it does so concretely (landed cost, profit, margin, verdict, break-even, summary of loss lines, CSV). Combined with error-isolation behavior and the estimates caveat, an agent has everything needed to call this correctly and interpret results.

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%, so the per-field meaning is already documented; the description adds the merge/precedence rule that the schema alone does not state — shared fields go in `common`, and each line overrides them. That is a genuine semantic addition for a nested two-parameter tool rather than restatement.

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?

The description opens with a specific verb-plus-resource statement — batch-running calculate_import_profit for up to 50 products — and immediately clarifies the key semantics that each line is its own shipment. That distinguishes it from the single-product sibling without the agent needing to compare schemas.

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?

It gives clear context for use: many products at once, shared conditions in `common` with per-line overrides, and the 50-line cap. It stops short of explicitly naming when to prefer the single-product calculate_import_profit or what_if_import_profit, so the agent must infer the boundary, but the batch framing makes the choice fairly obvious.

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