web.search performs a governed web search via HASP’s retrieval layer. The model receives up to 10 ranked results with title, URL, snippet, domain, and published date. HASP controls which provider executes, applies vertical-aware result ranking, and injects results into context before the model continues.
PHI enforcement
Two PHI scans run before any provider call:- On receipt — when the tool call is intercepted at the gateway, the query is scanned.
- Pre-dispatch — immediately before the outbound provider call, the planned query is scanned again.
phi_retrieval_behavior setting (configured under Settings → Retrieval): redact (default) strips PHI from queries before they leave HASP; block rejects the tool call entirely if PHI is detected. Web search providers (Tavily by default) never receive PHI under any circumstance — this is a hard architectural invariant enforced at the platform level.
Billing
- 5 AI Credits flat surcharge per call, debited on provider success.
- Normal input-token cost applies to the injected result content.
Input parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
query | string | Yes | The search query. |
maxResults | integer | No | Number of results to return. Range 1–10. Default: 5. |
freshnessWindow | string | No | Freshness filter. Accepted values: "7d", "30d", "1y". Omit for no filter. |
conversationId | string | No | Correlation context. Passed automatically by HASP in chat sessions. |
Output fields
Each result injected into context contains:| Field | Type | Description |
|---|---|---|
title | string | Page title. |
url | string | Source URL. |
snippet | string | Relevant excerpt from the page. |
domain | string | Apex domain (e.g., nih.gov). |
publishedDate | string | null | ISO 8601 date if known; null if unavailable. |
retrievedTimestamp | string | ISO 8601 timestamp of retrieval. |
rank | integer | Position in the result set (1-indexed). |
Vertical-aware ranking
For orgs with a healthcare vertical configured, HASP applies boosted ranking for authoritative clinical and regulatory sources including NIH, CDC, FDA, CMS, and PubMed. Results from these domains are ranked higher than general-web equivalents when present in the provider response.Citations
Results injected into the model’s context are persisted as citations linked to the conversation message. Citations survive page refresh and are available in the Audit endpoint. Each citation records the source URL, snippet, rank, andretrievedTimestamp.
Example
Tool call emitted by the model:Error codes
| Code | Description |
|---|---|
RETRIEVAL_DISABLED | Web retrieval is not enabled for this org. |
RETRIEVAL_PHI_BLOCKED | PHI was detected in the query and phi_retrieval_behavior=block is set. |
RETRIEVAL_PROVIDER_UNAVAILABLE | The upstream search provider returned an error or timed out. |