Agents
Every host gets the same two tools, urls_providers and urls_discover, and the same text. One answer across MCP, AI SDK, Pi and OMP beats four dialects of it.
MCP
{
"mcpServers": {
"urls": {
"command": "npx",
"args": ["-y", "@agntn/urls", "mcp"]
}
}
}
Want VirusTotal and URLScan at full strength? Put VIRUSTOTAL_API_KEY and URLSCAN_API_KEY in the server's environment. Building your own server? Use createMcpServer from @agntn/urls/mcp. It returns an unconnected server, so the connection is yours to make.
AI SDK
import { urlsAiTools } from "@agntn/urls/ai";
import { generateText } from "ai";
const { text } = await generateText({
model,
tools: urlsAiTools,
prompt: "Which JavaScript files has example.com shipped over the years?",
});
AI SDK 7. Need individual tools instead? discoverTool and providersTool are exported separately. Each call passes its abortSignal down to the sources.
Pi and OMP
pi install npm:@agntn/urls
omp plugin install @agntn/urls
Pi 1.x and OMP pass the host's cancel signal to the tools. Cancel means cancel, not keep asking sources politely.
Why a page and not everything?
A model's context window is a poor place to dump every URL. So a page holds at most 100 URLs per source. Set limit to change that. The library and urls discover stay unbounded.
The first line names the source, the count and the domain. It also says what cut the page. If the limit cut it, narrow the call or raise the limit. If the source stopped on its own, neither a higher limit nor filters help. Filters can't find URLs the source didn't return. Another source might.
What an answer looks like
Here's a real answer, compact enough to leave the model some room to think.
[wayback] 2 URLs for "example.com" (limit 2 reached; raise limit or narrow with match, ext, urlScope)
http://example.com:80/ 2002-01-20..2007-07-01
http://www.example.com:80/ 2002-03-28..2007-07-27
After the first line, each line is a URL. One the source dated ends with its first and last capture day.
With provider: "all", each source gets a block. A failed source gets one error line instead. Set reference: true and a via line names the query URL. It sits above the URLs that query returned.
The recorded comparisons on the landing come out at under a third of the same pages as indented JSON. Guess which one a context window prefers. Repeated query URLs cost tokens too, so reference is off by default.
For your code
The AI SDK output carries the page object next to its text. Your code doesn't have to read like a model.
| Field | Meaning |
|---|---|
provider | the source that answered |
count | URLs on this page |
limit | the bound that applied, the caller's or 100 |
hasMore | the source had more than fits, or stopped on its own with more advertised |
truncated | the source stopped on its own, its page safeguard or a cursor it won't follow |
urls | the records, each with url, source, input and the dates when the source gave any |
With provider: "all" it's { comparison }. Each source is a { provider, result } or a { provider, error }. MCP clients read the text only.
Try it without an agent
The explorer runs urls_discover through the docs worker and shows the exact text a model gets.