Loading source
Pulling the file list, source metadata, and syntax-aware rendering for this listing.
Source from repo
Build and deploy AI applications on Azure AI Foundry using Microsoft's model catalog and AI services
Files
Skill
Size
Entrypoint
Format
Open file
Syntax-highlighted preview of this file as included in the skill package.
foundry-agent/create/references/tool-web-search.md
1# Web Search Tool (Preview)23Enables agents to retrieve and ground responses with real-time public web information before generating output. Returns up-to-date answers with inline URL citations. This is the **default tool for web search** — no external resource or connection setup required.45> ⚠️ **Warning:** For Bing Grounding or Bing Custom Search (which require a separate Bing resource and project connection), see [tool-bing-grounding.md](tool-bing-grounding.md). Only use those when explicitly requested.67## Important Disclosures89- Web Search (preview) uses Grounding with Bing Search and Grounding with Bing Custom Search, which are [First Party Consumption Services](https://www.microsoft.com/licensing/terms/product/Glossary/EAEAS) governed by [Grounding with Bing terms of use](https://www.microsoft.com/bing/apis/grounding-legal-enterprise) and the [Microsoft Privacy Statement](https://go.microsoft.com/fwlink/?LinkId=521839&clcid=0x409).10- The [Data Protection Addendum](https://aka.ms/dpa) **does not apply** to data sent to Grounding with Bing Search and Grounding with Bing Custom Search.11- Data transfers occur **outside compliance and geographic boundaries**.12- Usage incurs costs — see [pricing](https://www.microsoft.com/bing/apis/grounding-pricing).1314## Prerequisites1516- A [basic or standard agent environment](https://learn.microsoft.com/azure/ai-foundry/agents/environment-setup)17- Azure credentials configured (e.g., `DefaultAzureCredential`)1819## Setup2021No external resource or project connection is required. The web search tool works out of the box when added to an agent definition.2223## Configuration Options2425| Parameter | Description | Default |26|-----------|-------------|---------|27| `user_location` | Approximate location (country/region/city) for localized results | None |28| `search_context_size` | Context window space for search: `low`, `medium`, `high` | `medium` |2930## Administrator Control3132Admins can enable or disable web search at the subscription level via Azure CLI. Requires Owner or Contributor access.3334- **Disable:** `az feature register --name OpenAI.BlockedTools.web_search --namespace Microsoft.CognitiveServices --subscription "<subscription-id>"`35- **Enable:** `az feature unregister --name OpenAI.BlockedTools.web_search --namespace Microsoft.CognitiveServices --subscription "<subscription-id>"`3637## Security Considerations3839- Treat web search results as **untrusted input**. Validate before use in downstream systems.40- Avoid sending secrets or sensitive data in prompts forwarded to external services.4142## Troubleshooting4344| Issue | Cause | Resolution |45|-------|-------|------------|46| No citations appear | Model didn't determine web search was needed | Update instructions to explicitly allow web search; ask queries requiring current info |47| Requests fail after enabling | Web search disabled at subscription level | Ask admin to enable — see Administrator Control above |48| Authentication errors (REST) | Bearer token missing, expired, or insufficient | Refresh token; confirm project/agent access |49| Outdated results | Content not recently indexed by Bing | Refine query to request most recent info |50| No results for specific topics | Query too narrow | Broaden query; niche topics may have limited coverage |51| Rate limiting (429) | Too many requests | Implement exponential backoff; space out requests |5253## References5455- [Web Search tool documentation](https://learn.microsoft.com/azure/ai-foundry/agents/how-to/tools/web-search?view=foundry)56- [Tool Catalog](https://learn.microsoft.com/azure/ai-foundry/agents/concepts/tool-catalog?view=foundry)57- [Bing Pricing](https://www.microsoft.com/bing/apis/grounding-pricing)58