Skip to main content
Glama
SoapyRED

FreightUtils MCP Server

incoterms_lookup

Read-onlyIdempotent

Look up Incoterms 2020 to explain trade terms, compare seller and buyer responsibilities, and identify risk and cost transfer points per transport mode.

Instructions

Look up Incoterms 2020 trade rules.

Incoterms define who pays for what in international trade — transport, insurance, customs clearance, and risk transfer. There are 11 rules: 7 for any transport mode (EXW, FCA, CPT, CIP, DAP, DPU, DDP) and 4 for sea/inland waterway only (FAS, FOB, CFR, CIF).

Use this tool when you need to:

  • Explain what an Incoterm means (e.g., "What does FOB mean?")

  • Compare seller vs buyer responsibilities

  • Determine risk and cost transfer points

  • Check which Incoterms apply to sea freight vs any mode

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
codeNoIncoterm code (e.g., "FOB", "CIF", "EXW")
categoryNoFilter by transport mode category

Implementation Reference

  • The incoterms_lookup tool definition including the handler function that calls apiGet('incoterms', ...) with code and category parameters.
    const incotermsLookup: ToolDef = {
      name: 'incoterms_lookup',
      description: `Look up Incoterms 2020 trade rules.
    
    Incoterms define who pays for what in international trade — transport, insurance, customs clearance, and risk transfer. There are 11 rules: 7 for any transport mode (EXW, FCA, CPT, CIP, DAP, DPU, DDP) and 4 for sea/inland waterway only (FAS, FOB, CFR, CIF).
    
    Use this tool when you need to:
    - Explain what an Incoterm means (e.g., "What does FOB mean?")
    - Compare seller vs buyer responsibilities
    - Determine risk and cost transfer points
    - Check which Incoterms apply to sea freight vs any mode`,
    
      schema: z.object({
        code: z.string().optional().describe('Incoterm code (e.g., "FOB", "CIF", "EXW")'),
        category: z.enum(['any_mode', 'sea_only']).optional().describe('Filter by transport mode category'),
      }).strict(),
    
      annotations: readOnlyAnnotations('Incoterms 2020 Lookup'),
    
      handler: async (args) =>
        apiGet('incoterms', { code: args.code, category: args.category }),
    };
  • Zod validation schema for incoterms_lookup: accepts optional 'code' (string) and optional 'category' (enum: any_mode or sea_only).
    schema: z.object({
      code: z.string().optional().describe('Incoterm code (e.g., "FOB", "CIF", "EXW")'),
      category: z.enum(['any_mode', 'sea_only']).optional().describe('Filter by transport mode category'),
    }).strict(),
  • src/tools.ts:713-733 (registration)
    The ALL_TOOLS array that exports all tool definitions, including incotermsLookup at line 723, which is iterated over in server.ts for MCP registration.
    export const ALL_TOOLS: ToolDef[] = [
      cbmCalculator,
      chargeableWeightCalculator,
      ldmCalculator,
      adrLookup,
      adrExemptionCalculator,
      adrLqEqCheck,
      airlineLookup,
      containerLookup,
      hsCodeLookup,
      incotermsLookup,
      palletFittingCalculator,
      unitConverter,
      consignmentCalculator,
      unlocodeLookup,
      ukDutyCalculator,
      shipmentSummary,
      uldLookup,
      vehicleLookup,
      getSubscribeLink,
    ];
  • src/server.ts:19-42 (registration)
    The MCP server registration loop that iterates ALL_TOOLS and registers each tool via server.tool().
    for (const tool of ALL_TOOLS) {
      server.tool(
        tool.name,
        tool.description,
        tool.schema.shape,
        tool.annotations,
        async (args: Record<string, unknown>) => {
          try {
            const result = await tool.handler(args);
            return {
              content: [
                { type: 'text' as const, text: JSON.stringify(result, null, 2) },
              ],
            };
          } catch (err: unknown) {
            const message = err instanceof Error ? err.message : String(err);
            return {
              content: [{ type: 'text' as const, text: `Error: ${message}` }],
              isError: true,
            };
          }
        },
      );
    }
  • The ToolDef interface and ToolAnnotationShape type used to define the shape of tool definitions including incotermsLookup.
    export interface ToolDef {
      name: string;
      description: string;
      // Allow any ZodObject (including .strict() variants) so individual tools
      // can opt into strict-key enforcement without breaking the shared type.
      schema: z.AnyZodObject;
      annotations: ToolAnnotationShape;
      handler: (args: Record<string, unknown>) => Promise<unknown>;
    }
Behavior3/5

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

Annotations already provide readOnlyHint=true, destructiveHint=false, and idempotentHint=true, which convey the tool's non-destructive, read-only nature. The description adds general background about Incoterms but does not disclose any additional behavioral traits beyond what the annotations already cover. Thus, it meets the baseline for transparency with annotations present.

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?

The description is tightly written with no unnecessary words. It front-loads the primary action ('Look up Incoterms 2020 trade rules.'), follows with a concise background, and then uses bullet points for usage scenarios. Every sentence serves a purpose, achieving an excellent structure.

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?

Given the tool's low complexity and the presence of a clear input schema, the description is largely complete. However, it lacks any mention of the output format or return value expectations, which would be helpful since no output schema is provided. The four use cases partially compensate, but a brief note on the response structure would improve completeness.

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?

The input schema already describes both parameters with examples and categories, achieving 100% coverage. The description adds value by listing all 11 Incoterm codes and their transport mode categories, providing context that helps the agent understand valid inputs beyond the schema. This extra information elevates the score above the baseline of 3.

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 clearly states the verb 'Look up' and the resource 'Incoterms 2020 trade rules', and it provides a detailed explanation of what Incoterms are, including the 11 rules and their categories. This purpose is unmistakably distinct from the sibling tools, which cover other domains like ADR, CBM, HS codes, etc., thus effectively differentiating itself.

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?

The description explicitly lists four use cases (e.g., 'Explain what an Incoterm means', 'Compare seller vs buyer responsibilities') in a bullet-point format, giving clear guidance on when to use the tool. However, it does not mention when not to use it or suggest alternative tools for related tasks, which prevents a score of 5.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/SoapyRED/freightutils-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server