scan_web_search
Scan web search queries to prevent PII leaks and data exfiltration. Blocks queries containing sensitive data or suspicious targets before they reach external search engines.
Instructions
Protective check on web search queries — catches PII leaks or suspicious targets before queries reach external services, so internal data doesn't escape through a search bar.
Call this BEFORE executing any web search query on behalf of a user or agent.
DECISION LOGIC:
If blocked=true: do NOT execute the search. Return the user_message explaining the query was rejected.
If blocked=false: the search query is safe to execute.
Checks for:
PII in search queries (SSN, credit cards, API keys, private keys)
Data exfiltration patterns (searching for leaked credentials, Google dorks)
Blocked/suspicious domains (paste sites, suspicious TLDs)
Enterprise context: Prevents agents from inadvertently leaking internal data (names, account numbers, internal project names) through external search engines.
ERROR HANDLING: If this tool returns an error or is unavailable, default to BLOCKING the search. Do NOT send unscanned queries to external services.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| query | Yes | The search query to scan | |
| targetDomains | No | Optional list of target domains to validate | |
| session_id | No | Session identifier for multi-turn correlation. | |
| agent_id | No | Your agent identifier for activity tracking. | |
| parent_agent_id | No | Parent agent ID if you are a sub-agent (delegation chain tracking). | |
| task_chain | No | Delegation path from root agent (e.g., "main→research→fetch"). |