For developers

What is llms.txt — and why customs tools need one

llms.txt and the Model Context Protocol let AI agents find and call live data instead of guessing — vital when tariff rates change monthly.

July 12, 2026 · 8 min read

Abstract glowing network of connected data nodes, representing how AI agents discover and call structured data like llms.txt and MCP tools

Photo by Pachon in Motion on Pexels

Ask an AI shopping assistant to price out importing a batch of wireless earbuds from Shenzhen, and increasingly it won't open a browser at all. It reaches for a tool instead — a live source it can query directly — rather than guessing from whatever it read during training. Two ideas sit behind that shift: llms.txt, a plain-text file that tells an AI agent what's actually worth reading on a site, and the Model Context Protocol (MCP), a standard that lets an agent call a site's data and functions directly. Neither is exotic. Together, they're quietly becoming as ordinary to a modern website as robots.txt or a sitemap.

What is llms.txt?

llms.txt is a proposed convention for giving AI agents and large language models a clean, curated index of a website's most useful content, published as plain Markdown at a predictable location — /llms.txt, at the site root. The idea, put forward publicly in 2024, borrows directly from robots.txt and sitemap.xml: a small file in a fixed place that tells an automated visitor where the good stuff is, rather than making it crawl and guess. Where robots.txt says what a crawler is allowed to fetch, llms.txt says what an AI agent should actually read first — a short, hand-picked list of pages, docs and data endpoints, described in plain language rather than buried inside navigation menus and marketing copy.

The original llms.txt proposal, format and rationale.

Read the llms.txt spec

Why would a site need this at all?

Because scraping rendered HTML is a slow, lossy way for an agent to learn what a site does. A typical product page is built for a human eye — hero image, navigation bar, cookie banner, three paragraphs of marketing copy before the one fact that matters. A language model parsing that page burns effort on layout noise and has no reliable way to tell a stale blog post from a live data feed. llms.txt strips that away: just links and one-line descriptions, ordered by what an agent actually needs first. A growing number of developer-tools companies — documentation platforms, API providers, a handful of SaaS products — already publish one, and AI-answer engines are starting to look for it the way search engines have looked for a sitemap for two decades.

What is the Model Context Protocol, and how is it different from an API?

llms.txt solves discovery — it tells an agent where to look. It doesn't solve execution, which is actually doing something with that information. That's where the Model Context Protocol comes in. MCP is an open standard, released by Anthropic in late 2024, for exposing a site's tools and data to an AI agent in a structured, machine-callable way. Instead of an agent guessing at an API's shape from prose documentation, or worse, trying to fill in a web form meant for a human, an MCP server publishes a fixed schema of tools — classify a product, look up a duty rate, calculate a landed cost — that any compliant agent can call directly, with typed inputs and typed outputs.

The practical difference: a REST API needs a developer to read the docs and write integration code before an agent can use it. An MCP server describes its own tools in a format the agent reads and calls immediately, with no bespoke integration and no guessing at field names.

Start free

A five-person sourcing-software team in Austin found this out the hard way. They wired an early AI copilot for their DTC clients to a partner's REST API, and every time a tariff schedule changed, someone had to read the release notes, patch the integration and redeploy before the numbers could be trusted again. When they moved the same copilot onto an MCP-based tool call instead, that maintenance loop mostly disappeared — the tool always returns the current rate, sourced and dated, without anyone touching the integration code.

Why does this matter specifically for customs and tariff data?

Most of what a language model knows, it learned once, during training, and that knowledge has a cutoff date. That's a reasonable trade-off for explaining how tariffs work in general. It's a genuinely dangerous one for stating what a specific tariff rate is today, because Section 301, Section 232 and reciprocal tariff actions move through individual Federal Register notices — sometimes with weeks of notice, sometimes with almost none. A model trained on data through late 2025 has no way of knowing about a Section 301 exclusion that lapsed in March 2026, or a new derivative product added to a Section 232 list in May. Ask it directly and it will often answer anyway — fluently, confidently, and wrong.

This is exactly the class of problem tool-calling was built for. Picture an AI sourcing agent helping a small electronics brand decide whether to source a Bluetooth speaker component from Vietnam or Malaysia. Asked to estimate the landed-cost difference, a model working from memory alone might quote last year's duty rate, miss an added tariff layer entirely, or sound completely certain while doing both. An agent wired to a live tool instead sends the HTS code and country of origin to a landed-cost endpoint, gets back a rate sourced to a dated schedule, and can tell the brand exactly when that figure was last verified. One approach is a guess dressed up as an answer. The other is a lookup — which is what the question actually needed all along.

Customs brokers who've started testing AI sourcing tools describe the same worry from a different angle: a model that sounds certain is more dangerous than one that admits it doesn't know, because nobody double-checks a confident-sounding answer. The tools worth trusting are the ones that say 'verify this' when they should, rather than filling the gap with something plausible.

See how PortRobin's API and MCP tools split classification (a judgment call) from duty rating (a lookup that must be sourced).

How AI agents classify products and compute landed cost

llms.txt, MCP or a traditional API — what should a site actually build?

These aren't competing options so much as different layers of the same problem. An agent first has to find out that a capability exists, and then it has to be able to act on it without a human writing custom glue code in between. Plain HTML with good SEO covers discovery for humans and search crawlers, but leaves an agent guessing. A traditional REST API covers execution, but only after a developer has read the docs. llms.txt and MCP together cover both steps for an agent specifically — which is why sites built with AI-agent traffic in mind are increasingly shipping both rather than treating them as optional extras.

How an AI agent gets value from a site, by approach
ApproachWhat it gives an AI agentBest for
Plain HTML + SEORenders for a human reader; an agent can scrape it, but has to guess at structure and can't call anything directlyMarketing pages, blog content, general human discovery
Traditional REST APIStructured data an agent can call, but only once a developer has read the docs and written custom integration codeApp-to-app integrations built and maintained by a development team
llms.txt + MCP togetherA curated index an agent can read on arrival, plus tools it can call natively with typed inputs and outputs, no bespoke integration requiredAI agents, chat assistants and answer engines acting with some autonomy

What this looks like in practice

On PortRobin, the /llms.txt file works as a short map: it tells an agent that classification, duty lookup and landed-cost calculation exist as callable tools, points at the API docs, and links to the MCP server for agents that support it. The MCP server then exposes those same capabilities as native tools — classify a product description, look up an HTS line, calculate landed cost — each returning a sourced figure and a verification date, or an explicit flag to check the number rather than a smoothed-over guess. An agent doesn't need to parse a webpage to work any of that out; it reads the index, calls the tool, and gets an answer it can actually stand behind.

Full API reference, MCP server setup and rate limits for developers and agent builders.

Developer docs & MCP server

If you're comparing this against other ways of getting classification data into an application, it's worth looking at how different providers structure their APIs, because the tool-calling layer is only as good as the data and honesty rules underneath it.

A comparison of HS-code classification APIs for 2026, including how each handles sourcing and confidence.

Best HS-code classification APIs, compared

Is llms.txt an official web standard yet?

Not formally, no, and that's worth being upfront about, because the AI-tooling space moves fast and it's easy to overclaim. There's no IETF RFC or W3C recommendation for llms.txt the way there is for the robots exclusion protocol or the sitemap format; it's a grassroots convention that a growing number of developer-facing sites have adopted because major AI labs and answer engines have started looking for it. MCP is on firmer ground: it has a published specification, a growing list of adopting platforms, and support built into several major agent frameworks. Neither guarantees an AI agent will surface a given site's data. Skipping both is simply a bet that agents will keep reading a business the slow, lossy way indefinitely.

The Model Context Protocol specification, adopters and tooling.

Read the MCP specification

Adopting llms.txt won't fix a site with nothing useful to say, and MCP won't make bad data trustworthy just because it's easier to call. What both do is make it possible for an agent to find the right data and use it correctly — which matters more every quarter, as more sourcing and purchasing research happens through an agent instead of a search box.

Start free

That last point matters more in trade compliance than almost anywhere else, because the underlying facts genuinely move. Tariff schedules get updated through official notices, not press releases, and the pace of Section 301 and 232 actions over the past few years means a rate that was correct in January can be stale by June. Nothing in this article is legal, customs or tax advice — treat any duty figure, from a model or otherwise, as a starting point to verify against the current schedule before you rely on it for a filing.

Section 301 and 232 actions are published as they happen — check before assuming a rate is current.

Browse the Federal Register

The US schedule of record for HTS classifications and duty rates.

Open the USITC HTS

What is llms.txt used for?

llms.txt is a plain-text file, published at a site's root, that gives AI agents and language models a curated index of a site's most useful pages and data. It works similarly to how a sitemap helps a search engine crawl a site, but it's written for an agent to read directly rather than to crawl and infer.

What is the difference between llms.txt and the Model Context Protocol?

llms.txt solves discovery, telling an agent what content and capabilities exist and where to find them, while MCP solves execution, letting an agent actually call a site's tools and data with structured, typed inputs and outputs. A site can publish one without the other, but together they let an agent find and use what it needs without custom integration work.

Why can't an AI agent just use its training data for tariff rates?

Because tariff and HS-code data changes through ongoing Federal Register notices, particularly Section 301, Section 232 and reciprocal tariff actions, and a language model's training data has a fixed cutoff date that can be months or years out of date by the time someone asks it a question. A live tool call to a sourced, dated dataset avoids that gap; recalling a number from training does not.

Do I need to build both llms.txt and an MCP server?

Not necessarily — llms.txt alone still helps an agent understand what a site offers, and an MCP server can exist without a matching llms.txt file. The two are complementary, though, and sites built for AI-agent traffic increasingly ship both so an agent can discover a capability and then call it in the same visit.

Does llms.txt help with Google search rankings?

No, llms.txt is aimed at AI agents and LLM-based tools rather than traditional search crawlers, which still rely on standard SEO signals, sitemaps and robots.txt. It's a complementary, emerging convention for AI-agent discovery, not a replacement for existing search infrastructure.

Get an API key, connect the MCP server, and start calling sourced classification and landed-cost data instead of guessing.

Start building free

Classify a product and see its real duty

Describe any product to get its HS/HTS code with the reasoning, the sourced duty rate including Section 301 and 232, and the full landed cost.