Skip to content

Commit 5e851ff

Browse files
SoapyREDclaude
andcommitted
feat(ics2): add ics2_check tool (registerTool + output schema) — EU ICS2 stop-words — v2.9.0
Adds the 22nd tool: ics2_check (EU ICS2 goods-description stop-words checker, reference only). Proxies the new GET /api/ics2-check so the result + _source come from REST; registered via registerTool with a full outputSchema + structuredContent + a citation derived from the result _source. No binary verdict. server.json + package.json → 2.9.0; README tool list/count → 22. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
1 parent 4ba7c66 commit 5e851ff

4 files changed

Lines changed: 52 additions & 8 deletions

File tree

README.md

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -10,14 +10,14 @@
1010

1111
FreightUtils is the neutral freight reference layer for AI agents — authoritative dangerous-goods, customs, location and freight-calculation data an agent can call and cite, from primary sources (ADR 2025 / UNECE, HS 2022 / WCO, IATA-regulated airline prefixes). Neutral by design: no freight to sell and no carrier to push, so an agent can trust it as ground truth regardless of who carries the load.
1212

13-
This [Model Context Protocol](https://modelcontextprotocol.io/) server gives AI agents access to 21 freight calculation and reference tools, covering road, air, and sea freight. Built by a UK ADR-certified freight transport planner.
13+
This [Model Context Protocol](https://modelcontextprotocol.io/) server gives AI agents access to 22 freight calculation and reference tools, covering road, air, and sea freight. Built by a UK ADR-certified freight transport planner.
1414

1515
**Website:** https://www.freightutils.com
1616
**API Docs:** https://www.freightutils.com/api-docs
1717

1818
---
1919

20-
## Tools (21)
20+
## Tools (22)
2121

2222
### Calculators
2323
| Tool | Description |
@@ -44,6 +44,7 @@ This [Model Context Protocol](https://modelcontextprotocol.io/) server gives AI
4444
| `hs_code_lookup` | 6,940 Harmonized System tariff codes (HS 2022) |
4545
| `uk_duty_calculator` | UK import duty and VAT (live GOV.UK Trade Tariff data) |
4646
| `incoterms_lookup` | Incoterms 2020 — all 11 rules with risk/cost transfer points |
47+
| `ics2_check` | Flag EU ICS2 unacceptable goods-description terms (stop-words) before filing an ENS — reference only |
4748

4849
### Reference Data
4950
| Tool | Description |
@@ -138,14 +139,14 @@ You should see three ticks and `All checks passed`:
138139
```
139140
FreightUtils MCP Diagnostic
140141
───────────────────────────
141-
package: freightutils-mcp@2.8.0
142+
package: freightutils-mcp@2.9.0
142143
health: https://www.freightutils.com/api/mcp/health
143144
144145
[1/3] Backend health (https://www.freightutils.com/api/mcp/health)
145-
✓ status=ok mcp_version=2.8.0 tools_registered=21 (143ms)
146+
✓ status=ok mcp_version=2.9.0 tools_registered=22 (143ms)
146147
147148
[2/3] MCP handshake (in-process via InMemoryTransport)
148-
✓ server freightutils-mcp@2.8.0 initialized; tools/list returned 21 tools
149+
✓ server freightutils-mcp@2.9.0 initialized; tools/list returned 22 tools
149150
150151
[3/3] End-to-end tool call (cbm_calculator l=120 w=80 h=100)
151152
✓ cbm_calculator → total=0.96 m³ (expected 0.96) (218ms)

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "freightutils-mcp",
3-
"version": "2.8.0",
3+
"version": "2.9.0",
44
"mcpName": "io.github.SoapyRED/freightutils",
55
"description": "Neutral freight reference and calculation tools for AI agents — ADR dangerous goods, HS codes, airline codes, UN/LOCODE, Incoterms and freight math from authoritative sources.",
66
"author": "FreightUtils <contact@freightutils.com>",

server.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
"url": "https://github.com/SoapyRED/freightutils-mcp",
88
"source": "github"
99
},
10-
"version": "2.8.0",
10+
"version": "2.9.0",
1111
"remotes": [
1212
{
1313
"type": "streamable-http",
@@ -18,7 +18,7 @@
1818
{
1919
"registryType": "npm",
2020
"identifier": "freightutils-mcp",
21-
"version": "2.8.0",
21+
"version": "2.9.0",
2222
"transport": {
2323
"type": "stdio"
2424
}

src/tools.ts

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -832,6 +832,48 @@ Use to confirm a container/AWB/IMO number is well-formed, or to extract identifi
832832
},
833833
};
834834

835+
// ─────────────────────────────────────────────────────────────
836+
// ICS2 Stop-Words Checker (EU ICS2 goods-description terms)
837+
// registerTool with full output schema + structuredContent; proxies
838+
// /api/ics2-check so the result + _source come from REST. Reference only.
839+
// ─────────────────────────────────────────────────────────────
840+
841+
const ics2Check: ToolDef = {
842+
name: 'ics2_check',
843+
description: `Check a goods description against the official EU ICS2 stop-words list — terms the European Commission deems too vague/generic to be accepted in an entry summary declaration (ENS) goods-description field (data element 18 05 000 000).
844+
845+
Pass description=<goods description>; returns the flagged terms (each with a note: standalone term = automatic rejection, embedded = make the description more specific), a clean boolean, a caveat, and a _source citing the EU list + legal basis.
846+
847+
Use to QA a goods description BEFORE filing an ENS — for customs/documentation teams, brokers, forwarders' documentation side, and agents building filing pipelines. STRICTLY a reference check: NOT an ENS filing, NOT a customs-compliance determination, NOT legal advice. The list is non-exhaustive and updated periodically; clean does NOT guarantee acceptance. No binary accepted/rejected verdict. Distinct from hs_code_lookup (commodity codes) and uk_duty_calculator (duty/VAT).`,
848+
849+
schema: z.object({
850+
description: z.string().describe('The goods description to check against the EU ICS2 stop-words list.'),
851+
}).strict(),
852+
853+
outputSchema: {
854+
description: z.string(),
855+
flagged: z.array(z.object({ term: z.string(), note: z.string() })),
856+
clean: z.boolean(),
857+
caveat: z.string(),
858+
_source: z.object({
859+
type: z.string(), authority: z.string(), dataset: z.string(), legal_basis: z.string(),
860+
list_in_force: z.string(), source_url: z.string(), licence: z.string(),
861+
retrieved: z.string(), non_exhaustive: z.boolean(), retrieved_via: z.string(),
862+
}),
863+
disclaimer: z.string(),
864+
},
865+
866+
annotations: readOnlyAnnotations('ICS2 Stop-Words Checker'),
867+
868+
handler: async (args) => apiGet('ics2-check', { description: args.description }),
869+
870+
citation: (result: unknown) => {
871+
const r = result as { _source?: { authority?: string; legal_basis?: string; list_in_force?: string } };
872+
const s = r._source ?? {};
873+
return `Source: EU ICS2 stop-words list — ${s.authority ?? 'European Commission DG TAXUD'} (${s.legal_basis ?? 'Commission Delegated Regulation (EU) 2015/2446'}), in force ${s.list_in_force ?? '2026-05-04'} — checked by freightutils.com`;
874+
},
875+
};
876+
835877
// ─────────────────────────────────────────────────────────────
836878
// Export all tools
837879
// ─────────────────────────────────────────────────────────────
@@ -857,5 +899,6 @@ export const ALL_TOOLS: ToolDef[] = [
857899
vehicleLookup,
858900
emissionsCalculator,
859901
identifierValidator,
902+
ics2Check,
860903
getSubscribeLink,
861904
];

0 commit comments

Comments
 (0)