Skip to main content
Glama

LLM context retrieval (RAG)

brave_llm_context
Read-only

Retrieves 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

TableJSON Schema
NameRequiredDescriptionDefault
countNoMaximum number of search results considered to select the LLM context data. Default 20, max 50.
queryYesThe user's search query. Max 400 characters and 50 words.
countryNo2-letter country code (ISO 3166-1 alpha-2). Defaults to US.
freshnessNoFilter results by recency. Use pd, pw, pm, py, or YYYY-MM-DDtoYYYY-MM-DD.
spellcheckNoWhether to spellcheck the query.
search_langNo2-letter language code for the search. Defaults to en.
enable_localNoWhether to enable local recall.
context_threshold_modeNoMode used to determine the inclusion threshold for content.
enable_source_metadataNoEnable source metadata enrichment (site_name, favicon) in the sources attribute.
maximum_number_of_urlsNoMaximum number of different URLs to include in LLM context.
maximum_number_of_tokensNoApproximate maximum number of tokens to include in context. Default 8192, max 32768.
maximum_number_of_snippetsNoMaximum number of snippets (chunks of text) to include in LLM context. Default 50, max 256.
maximum_number_of_tokens_per_urlNoMaximum number of tokens to include per URL. Default 4096, max 8192.
maximum_number_of_snippets_per_urlNoMaximum number of snippets to include per URL. Default 50, max 100.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A4.2/5.0
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Annotations already declare readOnlyHint=true. Description adds that it returns text chunks, tables, code blocks, and a sources map, providing useful behavioral context beyond annotations.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Three concise sentences, front-loaded with core functionality, each sentence adds distinct value (purpose, differentiation, usage guidance). No waste.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given high schema coverage and read-only annotations, the description adequately covers tool behavior. Could mention response structure more, but sufficient for a RAG tool.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100%, so parameter semantics are well-documented in schema. Description does not add extra parameter-specific meaning beyond schema, earning baseline 3.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states it retrieves pre-extracted, relevance-ranked web content using Brave's LLM Context API, optimized for AI agents and RAG, distinguishing it from traditional web search by returning actual content chunks.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Explicitly contrasts with traditional web search, indicating when to use this tool over siblings like brave_web_search. Provides citation guidance but lacks explicit when-not usage instructions.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.