/nlweb-protocol:nlweb-schema-org-groundingfrom nlweb-protocol
Prepares site content as Schema.org JSON-LD for NLWeb ingestion, covering supported types (Recipe, Product, Movie, Event, Article, RealEstate, Course), JSON-LD embedding patterns, sites.xml/tools.xml registration, and how schema_object flows through ranking to agent results. Use when authoring or auditing structured data for NLWeb.
Ships in nlweb-protocol. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
Config layout changed upstream. NLWeb replaced the single
site_types.xmlwith two files inconfig/:sites.xml(site name →itemTypelist + description) andtools.xml(per-site / per-type tool definitions, prompts and examples, scoped by<Site id="…">/<Item>blocks). Older guidance — including anysite_type/extendsinheritance syntax — describes the retired file. Fetchconfig/sites.xmlandconfig/tools.xmlfrom the live repo before editing anything.
Fetch live references:
<returnStruc> shapes work.schema.org JSON-LD validator — Google's Rich Results Test is a quick way to validate before ingest.AskAgent/python/methods/recipe_substitution.py, accompaniment.py, compare_items.py for examples of how type-specific tools consume the schema_object.NLWeb's defining design choice: results carry their full Schema.org object back to the agent. Unlike a generic RAG system that returns text chunks, NLWeb returns structured JSON-LD — so an agent receiving a Recipe result gets ingredients, cookTime, nutrition, recipeYield, not just a paragraph of text. This is what makes NLWeb results agent-actionable.
R.V. Guha (NLWeb's author) co-created Schema.org for exactly this reason — the data was already structured; NLWeb finally exposes it to agents.
tools.xml enumerates the types with per-type tool / prompt overrides. Common types (verify the live file):
| Type | Use Case | Type-Specific Tools |
|---|---|---|
Recipe | Cooking sites | recipe_substitution, accompaniment |
Product | E-commerce | compare_items, item_details |
Movie / TVSeries | Streaming/reviews | compare_items |
Event | Calendars, ticketing | item_details |
Article / NewsArticle / BlogPosting | News, blogs | summarize-mode default |
RealEstate / Apartment / House | Listings | item_details, compare |
Course | EdTech | item_details |
Restaurant / LocalBusiness | Maps, directories | accompaniment, item_details |
Book | Catalogs | compare, item_details |
Person / Organization | Profiles | item_details |
NLWeb falls back to a default tool set for any Schema.org type not explicitly enumerated.
Schema.org JSON-LD is typically embedded in HTML via a <script type="application/ld+json"> tag:
<script type="application/ld+json">
{
"@context": "https://schema.org",
"@type": "Recipe",
"name": "Classic Tomato Soup",
"url": "https://example.com/recipes/tomato-soup",
"image": "https://example.com/images/tomato-soup.jpg",
"author": { "@type": "Person", "name": "Jane Doe" },
"datePublished": "2025-09-12",
"description": "A simple weeknight tomato soup.",
"recipeIngredient": ["6 ripe tomatoes", "1 onion", "..."],
"recipeInstructions": [...],
"nutrition": { "@type": "NutritionInformation", "calories": "200" },
"cookTime": "PT30M",
"recipeYield": "4 servings"
}
</script>
NLWeb's URL-list ingest path extracts this directly. The richer the JSON-LD, the more useful the result.
schema_object Field in ResponsesEvery NLWeb result contains:
{
"url": "...",
"name": "...",
"site": "...",
"score": 0.87,
"description": "...",
"schema_object": { /* the full JSON-LD as ingested */ }
}
Agents can pattern-match on schema_object.@type to render appropriately, extract specific properties (e.g., offers.price for products), or chain to a follow-up tool call.
In addition to config_nlweb.yaml's sites: allowlist, the demo data ships with a sites.xml-style registry tying site names to crawl sources and Schema.org type defaults. Check the live repo for the current registration convention — this is an area that's been evolving.
| Type | Always include |
|---|---|
| Recipe | name, url, image, recipeIngredient, recipeInstructions, cookTime, recipeYield |
| Product | name, url, image, description, offers (price, priceCurrency, availability) |
| Article | headline, url, image, author, datePublished, description, articleBody (or summary) |
| Event | name, url, startDate, location, description |
| Movie | name, url, image, director, datePublished, genre, description |
| RealEstate | name, url, image, address, numberOfRooms, floorSize, price |
The fewer fields populated, the worse the result quality — especially for mode=generate answers.
tools.xml defines a tree:
This is mixed-mode programming in action — small, type-aware LLM calls drive the response.
Before ingest:
<script type="application/ld+json">.@type is one NLWeb's tools.xml knows about — if not, results still work but use default prompts.@context: "https://schema.org" — NLWeb's parser keys off this.url — it's the deduplication key across retrieval backends.Recipe not CreativeWork) so type-specific tools activate.@type discriminators (e.g., author as Person, offers as Offer).After loading, hit a result and inspect schema_object:
curl 'http://localhost:8000/ask?query=quick+dinners&site=recipes&streaming=false&mode=list' | jq '.results[0].schema_object'
If schema_object is missing key fields, fix the source HTML — not NLWeb's config.
If you want a custom domain (say, Podcast episodes) with type-specific tools:
<site_type> entry in tools.xml referencing your @type value.prompts.xml (or inherit defaults).methods/ (see nlweb-tools-framework).If your source isn't JSON-LD (CSV, proprietary API), map fields to Schema.org at ingest time, not query time. Update rss2schema.py or write a small adapter that emits Schema.org JSON before calling db_load. The richer the mapping, the better the agent experience.
@type is missing or non-Schema.org — results work but type-specific tools never fire.url is relative — breaks deduplication; always emit absolute URLs.datePublished: "2025-09-12" works; "Sept 12, 2025" does not.offers is a bare string instead of an Offer object — agents lose the price field.Always validate JSON-LD with an external tool before assuming ingest will work — silent parser failures are common.
What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
schema-org, json-ld, structured-data, nlweb, agent-actionable
npx claudepluginhub orcaqubits/agentic-commerce-skills-plugins --plugin nlweb-protocol13 skills in this plugin
/nlweb-ask-endpointImplement and consume the NLWeb /ask REST endpoint — request shape (GET/POST, query-string and v0.55 structured body), SSE streaming response, modes (list/summarize/generate), in-stream "message_type" headers, error envelopes, and client-side parsing. Use when building an NLWeb server route, calling /ask from a custom agent, or debugging /ask responses./nlweb-auth-multitenancyConfigure NLWeb authentication and multi-tenant deployments — OAuth providers (GitHub, Google, Microsoft, Facebook), session storage, the `sites:` allowlist in `config_nlweb.yaml`, conversation persistence per authenticated user, and per-tenant data isolation. Use when adding login to an NLWeb instance, hosting multiple customers on one deployment, or persisting conversation history./nlweb-chatgpt-appsdkIntegrate NLWeb with ChatGPT's Apps SDK — the Node.js MCP server in `openai-apps-sdk-integration/`, the `nlweb-list` tool, the React widget at `ui://widget/nlweb-list.html`, and the port-8100 AppSDK adapter that translates NLWeb's message list to OpenAI Apps SDK envelopes. Use when publishing an NLWeb site as a ChatGPT app or wiring NLWeb results into an Apps SDK widget./nlweb-data-loadingIngest site content into NLWeb's vector store using `db_load.py` — supports RSS/Atom feeds, Schema.org JSON-LD, sitemap-driven URL lists, and CSV. Covers chunking, embedding computation, site partitioning, batch sizing, delete-and-reload, and per-backend write_endpoint targeting. Use when bootstrapping a site's index, refreshing content, or migrating between retrieval backends./nlweb-deploymentDeploy NLWeb to production — Azure App Service (`deploy_azure_webapp.sh` + AI Search + Azure OpenAI), Snowflake Container Services, Cloudflare Worker + AutoRAG, Docker, and self-hosted. Covers env-var conventions, `mode: production` lockdown, scaling, TLS, OAuth, and CI for data reloads. Use when going from local dev to a hosted, internet-facing NLWeb instance./nlweb-dev-patternsNLWeb development patterns — the mixed-mode programming philosophy, FastTrack vs Analysis parallel paths, config file precedence and the `mode: development` override trap, in-stream NLWS headers vs HTTP headers, embedding/ingest determinism, debugging the LLM-call chain, neural scorer selection (NLWebScorer ModernBERT+GAM), and the A2A / AgentFinder / DataFinder / ModelRouter subsystems. Use when designing the internal architecture of an NLWeb deployment or solving cross-cutting concerns.Other plugins' skills for the same job