LLM context retrieval (RAG)
brave_llm_contextRetrieves pre-extracted, relevance-ranked web content using Brave's LLM Context API, optimized for AI agents, LLM grounding, and RAG pipelines. Unlike a traditional web search that returns links and short descriptions, this tool returns the actual substance of matching pages — text chunks, tables, code blocks, and structured data — so the model can reason over it directly. When relaying results in markdown-supporting environments, cite source URLs from the sources map.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| count | No | Maximum number of search results considered to select the LLM context data. Default 20, max 50. | |
| query | Yes | The user's search query. Max 400 characters and 50 words. | |
| country | No | 2-letter country code (ISO 3166-1 alpha-2). Defaults to US. | |
| freshness | No | Filter results by recency. Use pd, pw, pm, py, or YYYY-MM-DDtoYYYY-MM-DD. | |
| spellcheck | No | Whether to spellcheck the query. | |
| search_lang | No | 2-letter language code for the search. Defaults to en. | |
| enable_local | No | Whether to enable local recall. | |
| context_threshold_mode | No | Mode used to determine the inclusion threshold for content. | |
| enable_source_metadata | No | Enable source metadata enrichment (site_name, favicon) in the sources attribute. | |
| maximum_number_of_urls | No | Maximum number of different URLs to include in LLM context. | |
| maximum_number_of_tokens | No | Approximate maximum number of tokens to include in context. Default 8192, max 32768. | |
| maximum_number_of_snippets | No | Maximum number of snippets (chunks of text) to include in LLM context. Default 50, max 256. | |
| maximum_number_of_tokens_per_url | No | Maximum number of tokens to include per URL. Default 4096, max 8192. | |
| maximum_number_of_snippets_per_url | No | Maximum number of snippets to include per URL. Default 50, max 100. |