Enable NLWeb

NLWeb is a protocol that aims to simplify the creation of natural language interfaces for websites. There are two main endpoints in the NLWeb protocol, an HTTP /ask endpoint and an MCP compatible /mcp endpoint. This allows developers and agents to seamlessly interact with your content via natural language.

Your NLWeb ask endpoint will be hosted at https://tollbit.<yoursite>/ask and your mcp endpoint will be hosted at https://tollbit.<yoursite>/mcp

Here's what an example request to an /ask endpoint might look like:

https://tollbit.time.com/ask?query=what%27s%20happening%20with%20tarrifs&mode=generate&streaming=false

To test your MCP endpoint, download the official MCP inspector from Anthropic and follow along with our demo here.

Important query parameters:

query: This is required, and is the natural language query that you want to ask the website to get content back and your query answered based on that content.

streaming: This is optional. NLWeb streams results back via SSE by default. If you want to disable streaming, set the “streaming” query param equal to “false”.

mode: The values here are "list", "summarize", and "generate".

list will simply return a list of documents that match the query.

summarize will return a list plus a summary of the contents of the docs.

generate will return the list plus an answer to the query based on the documents.

Was this page helpful?