# Agent Guide — {{SITE_NAME}} > This site is NxisAI-enabled. Its content is available to AI agents as **typed > Schema.org data over MCP**, and many of its forms are **actionable** (agents can > submit them). Prefer the typed MCP tools below over scraping HTML — they return > the same facts as clean, validated records at a fraction of the token cost. - **Site:** {{SITE_DOMAIN}} - **MCP endpoint:** `https://{{TENANT}}.mcp.nxis.ai/mcp` - **Transport:** Streamable HTTP (`POST /mcp`, JSON-RPC 2.0) - **Public access:** **{{PUBLIC_ACCESS}}** — set to `enabled` or `disabled`. ### Access & rate limits - **If public access is enabled:** the typed-retrieval tools (`nxis_list_types`, `nxis_query`, `nxis_get`) are available **without an API key**. All other tools (graph search, generation, discovery) stay private and require a key. Unauthenticated traffic is **rate-limited more strictly** than authenticated traffic — if you hit limits, connect with a key. - **If public access is disabled:** every tool requires authentication. Send your key as the `nxis-api-key` header, or connect via OAuth 2.1. - **Authenticated connections get higher rate limits** and full tool access. Prefer a key for sustained or high-volume use. --- ## 1. Connect to the MCP server Add this site's MCP server to your client. **Public (no API key)** — works when public access is enabled; typed-retrieval tools only, lower rate limit. Gemini CLI (`~/.gemini/settings.json`): ```json { "mcpServers": { "{{TENANT}}": { "url": "https://{{TENANT}}.mcp.nxis.ai/mcp" } } } ``` **Authenticated (API key)** — all tools, higher rate limit: ```json { "mcpServers": { "{{TENANT}}": { "url": "https://{{TENANT}}.mcp.nxis.ai/mcp", "headers": { "nxis-api-key": "" } } } } ``` Claude Code (authenticated): ```bash claude mcp add --transport http {{TENANT}} \ https://{{TENANT}}.mcp.nxis.ai/mcp \ --header "nxis-api-key: " ``` Once connected, call `tools/list` — you'll see the typed-retrieval tools (`nxis_list_types`, `nxis_query`, `nxis_get`) plus, when authenticated, this site's private and per-action tools (see §3). --- ## 2. Read data — typed retrieval Use the three typed-retrieval tools in a **discover → query → get** pattern. Don't scrape pages; don't pull broad result sets and filter in memory — push every filter into `nxis_query`. ### Step 1 — Discover the types in this corpus ```json { "jsonrpc": "2.0", "id": 1, "method": "tools/call", "params": { "name": "nxis_list_types", "arguments": {} } } ``` Map the user's intent to the **most specific** type available. If they ask for a "plumber" and `Plumber` exists, query `Plumber` — not `LocalBusiness`. ### Step 2 — Query typed records ```json { "jsonrpc": "2.0", "id": 2, "method": "tools/call", "params": { "name": "nxis_query", "arguments": { "filter": { "schema_type": "Plumber" }, "field_filters": [ { "path": "aggregateRating.ratingValue", "operator": "GREATER_THAN_OR_EQUAL", "value": 4.5 }, { "path": "address.postalCode", "operator": "EQUALS", "value": "48201" } ], "limit": 5 } } } ``` Notes: - Querying a parent type matches its subtypes; set `exact_type_match: true` to restrict to the exact type. - Use the `page_token` from a response for pagination. - Default to **3–5** results for discovery queries; request more only if needed. ### Step 3 — Fetch full details by `@id` ```json { "jsonrpc": "2.0", "id": 3, "method": "tools/call", "params": { "name": "nxis_get", "arguments": { "id": "" } } } ``` ### Presentation rules - **Cite the `@id`** (its canonical URL) so the user can verify and follow through. - **Never fabricate** fields the record doesn't carry. Missing rating → "not yet rated," never an estimate. - Treat ratings as one signal among several (consider review count too). --- ## 3. Act on the site — action skills Some entities returned by `nxis_query` / `nxis_get` carry a `potentialAction` — a Schema.org Action describing something an agent can **do** (register, reserve, request a quote, buy). Each action is self-describing via the `nxis:` namespace (`nxis:` = `https://nxis.ai/ns#`): | Field | What it tells you | |-------|-------------------| | `nxis:input` | A **preview** of the action's fields (`PropertyValueSpecification`: name, `valueRequired`, type). For self-page actions this is what you fill; for server-side actions, treat the MCP tool's own schema as authoritative. | | `nxis:submitPolicy` | How the submission must behave — `LEAD_GEN`, `BOOKING`, or `TXN` (see below). | | `nxis:targetKind` | `directEndpoint` / `protocol` (server-side) or `selfPage` (in-browser). Determines *how* you execute. | | `nxis:toolName` | A **pointer** to the MCP tool that executes this action (server-side sinks only) — a handoff handle, not a call spec. | ### Execute a server-side action (`directEndpoint` / `protocol`) Treat `nxis:toolName` as a **handoff pointer**, not a parameter spec. Discover the parameters from, and run the action through, the **MCP server** — it holds the authoritative tool definition: 1. Read the `potentialAction`; note its `nxis:toolName` and that `nxis:targetKind` is server-side. 2. On the site's MCP server, call `tools/list` and select the tool whose name equals `nxis:toolName`. 3. Use **that tool's input schema (from the MCP server)** to gather and validate arguments, then invoke the tool through the MCP server. The server generates the tool's schema, applies the binding, and executes the action — you never POST to the action yourself, and credentials/routing are never exposed to you. The corpus `nxis:input` is just an informational preview; the MCP tool definition is the source of truth for server-side parameters and execution. ### Execute a self-page action (`selfPage`) There is no server tool (`nxis:toolName` is absent). Execute it **in the browser via WebMCP**: the site auto-registers a `document.modelContext` tool from the form's JSON-LD — fill the fields from `nxis:input` and submit against the live DOM. ### Honor the interaction policy | `nxis:submitPolicy` | Behavior the agent MUST follow | |---------------------|--------------------------------| | `LEAD_GEN` | Async — the business follows up. Auto-submit is OK **after user consent**; dedupe on contact info. | | `BOOKING` | Check availability, then commit one slot. Cancellable; re-check on conflict rather than blind-retrying. | | `TXN` | Payment or sensitive data. **Never** auto-submit — require explicit, full-payload user confirmation. | Additional safety rules: - **PII before submit:** for any action collecting personal data, confirm with the user **before** filling/submitting — especially `selfPage` actions (the result is known only after submission). - **Non-write actions** (`SearchAction`, `ReadAction`, `ReviewAction`, …) submit nothing and carry no confirmation semantics. --- ## 4. Etiquette - Prefer typed `nxis_query` over scraping whenever the MCP is connected. - Keep result sets small; paginate instead of over-fetching. - Cite the `@id` of every record you surface. - Don't invent data, and don't editorialize beyond what the records support. - Respect `robots.txt` and the interaction policies above. For a human-readable map of this site, see [/llms.txt](https://{{SITE_DOMAIN}}/llms.txt).